From 462e0c2094b802a211de653b13c50a45daed9fb6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 24 Jul 2024 07:09:56 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- .../v1/accesscontextmanager-api.json | 8 +- .../v1/accesscontextmanager-gen.go | 10 +- adsenseplatform/v1/adsenseplatform-api.json | 721 + adsenseplatform/v1/adsenseplatform-gen.go | 1783 + aiplatform/v1/aiplatform-api.json | 627 +- aiplatform/v1/aiplatform-gen.go | 1127 +- aiplatform/v1beta1/aiplatform-api.json | 449 +- aiplatform/v1beta1/aiplatform-gen.go | 587 +- .../v1alpha/analyticsadmin-api.json | 69 +- analyticsadmin/v1alpha/analyticsadmin-gen.go | 171 +- analyticsadmin/v1beta/analyticsadmin-api.json | 67 +- analyticsadmin/v1beta/analyticsadmin-gen.go | 169 +- apim/v1alpha/apim-api.json | 163 +- apim/v1alpha/apim-gen.go | 395 +- artifactregistry/v1/artifactregistry-api.json | 7 +- artifactregistry/v1/artifactregistry-gen.go | 3 + .../v1beta2/artifactregistry-api.json | 7 +- .../v1beta2/artifactregistry-gen.go | 3 + assuredworkloads/v1/assuredworkloads-api.json | 6 +- assuredworkloads/v1/assuredworkloads-gen.go | 6 +- .../v1beta1/assuredworkloads-api.json | 6 +- .../v1beta1/assuredworkloads-gen.go | 6 +- .../authorizedbuyersmarketplace-api.json | 3513 ++ .../authorizedbuyersmarketplace-gen.go | 7892 ++++ backupdr/v1/backupdr-api.json | 16 +- backupdr/v1/backupdr-gen.go | 19 +- .../v1/certificatemanager-api.json | 4 +- .../v1/certificatemanager-gen.go | 3 +- classroom/v1/classroom-api.json | 10 +- classroom/v1/classroom-gen.go | 20 +- cloudasset/v1/cloudasset-api.json | 8 +- cloudasset/v1/cloudasset-gen.go | 10 +- cloudasset/v1beta1/cloudasset-api.json | 8 +- cloudasset/v1beta1/cloudasset-gen.go | 10 +- cloudasset/v1p1beta1/cloudasset-api.json | 8 +- cloudasset/v1p1beta1/cloudasset-gen.go | 10 +- cloudasset/v1p5beta1/cloudasset-api.json | 8 +- cloudasset/v1p5beta1/cloudasset-gen.go | 10 +- cloudasset/v1p7beta1/cloudasset-api.json | 8 +- cloudasset/v1p7beta1/cloudasset-gen.go | 10 +- .../v1/cloudcontrolspartner-api.json | 11 +- .../v1/cloudcontrolspartner-gen.go | 8 +- .../v1beta/cloudcontrolspartner-api.json | 11 +- .../v1beta/cloudcontrolspartner-gen.go | 8 +- cloudfunctions/v1/cloudfunctions-api.json | 4 +- cloudfunctions/v1/cloudfunctions-gen.go | 3 +- cloudtrace/v2beta1/cloudtrace-api.json | 6 +- cloudtrace/v2beta1/cloudtrace-gen.go | 10 +- composer/v1/composer-api.json | 7 +- composer/v1/composer-gen.go | 2 + composer/v1beta1/composer-api.json | 7 +- composer/v1beta1/composer-gen.go | 2 + compute/v0.alpha/compute-api.json | 799 +- compute/v0.alpha/compute-gen.go | 361 +- compute/v0.alpha/compute2-gen.go | 574 + compute/v0.alpha/compute3-gen.go | 825 + config/v1/config-api.json | 6 +- config/v1/config-gen.go | 4 +- connectors/v1/connectors-api.json | 27 +- connectors/v1/connectors-gen.go | 25 +- container/v1/container-api.json | 155 +- container/v1/container-gen.go | 146 +- container/v1beta1/container-api.json | 154 +- container/v1beta1/container-gen.go | 146 +- content/v2.1/content-api.json | 6 +- content/v2.1/content-gen.go | 5 + css/v1/css-api.json | 10 +- css/v1/css-gen.go | 17 +- dialogflow/v2beta1/dialogflow-api.json | 4 +- dialogflow/v2beta1/dialogflow-gen.go | 2 +- discoveryengine/v1/discoveryengine-api.json | 3916 +- discoveryengine/v1/discoveryengine-gen.go | 5773 ++- .../v1alpha/discoveryengine-api.json | 15593 ++++---- .../v1alpha/discoveryengine-gen.go | 19827 ++++++---- .../v1beta/discoveryengine-api.json | 7059 ++-- discoveryengine/v1beta/discoveryengine-gen.go | 30311 +++++++++------- displayvideo/v3/displayvideo-api.json | 17 +- displayvideo/v3/displayvideo-gen.go | 22 +- docs/v1/docs-api.json | 247 +- docs/v1/docs-gen.go | 286 +- documentai/v1/documentai-api.json | 63 +- documentai/v1/documentai-gen.go | 89 + documentai/v1beta3/documentai-api.json | 63 +- documentai/v1beta3/documentai-gen.go | 89 + .../v1alpha/firebaseappdistribution-api.json | 8 +- .../v1alpha/firebaseappdistribution-gen.go | 1 + firebaseml/v2beta/firebaseml-api.json | 32 +- firebaseml/v2beta/firebaseml-gen.go | 54 +- firestore/v1/firestore-api.json | 44 +- firestore/v1/firestore-gen.go | 63 +- firestore/v1beta1/firestore-api.json | 4 +- firestore/v1beta1/firestore-gen.go | 5 +- healthcare/v1/healthcare-api.json | 39 +- healthcare/v1/healthcare-gen.go | 100 +- healthcare/v1beta1/healthcare-api.json | 60 +- healthcare/v1beta1/healthcare-gen.go | 151 +- iam/v1/iam-api.json | 63 +- iam/v1/iam-gen.go | 168 +- language/v2/language-api.json | 10 +- language/v2/language-gen.go | 4 + manufacturers/v1/manufacturers-api.json | 10 +- manufacturers/v1/manufacturers-gen.go | 11 +- meet/v2/meet-api.json | 20 +- meet/v2/meet-gen.go | 78 +- .../accounts_v1beta/merchantapi-api.json | 6 +- .../accounts_v1beta/merchantapi-gen.go | 7 +- .../datasources_v1beta/merchantapi-api.json | 4 +- .../datasources_v1beta/merchantapi-gen.go | 3 +- .../products_v1beta/merchantapi-api.json | 6 +- .../products_v1beta/merchantapi-gen.go | 5 + .../v1alpha1/migrationcenter-api.json | 38 +- .../v1alpha1/migrationcenter-gen.go | 44 +- ondemandscanning/v1/ondemandscanning-api.json | 8 +- ondemandscanning/v1/ondemandscanning-gen.go | 1 + .../v1beta1/ondemandscanning-api.json | 8 +- .../v1beta1/ondemandscanning-gen.go | 1 + pollen/v1/pollen-api.json | 16 +- pollen/v1/pollen-gen.go | 18 +- .../v1/recaptchaenterprise-api.json | 18 +- .../v1/recaptchaenterprise-gen.go | 18 +- redis/v1/redis-api.json | 5 +- redis/v1/redis-gen.go | 3 +- redis/v1beta1/redis-api.json | 5 +- redis/v1beta1/redis-gen.go | 3 +- retail/v2alpha/retail-api.json | 45 +- retail/v2alpha/retail-gen.go | 149 + retail/v2beta/retail-api.json | 45 +- retail/v2beta/retail-gen.go | 149 + run/v1/run-api.json | 4 +- run/v1/run-gen.go | 3 +- run/v2/run-api.json | 4 +- run/v2/run-gen.go | 3 +- securitycenter/v1/securitycenter-api.json | 66 +- securitycenter/v1/securitycenter-gen.go | 207 +- .../v1beta1/securitycenter-api.json | 16 +- securitycenter/v1beta1/securitycenter-gen.go | 18 +- .../v1beta2/securitycenter-api.json | 68 +- securitycenter/v1beta2/securitycenter-gen.go | 113 +- .../v1/serviceconsumermanagement-api.json | 10 +- .../v1/serviceconsumermanagement-gen.go | 37 +- .../serviceconsumermanagement-api.json | 10 +- .../v1beta1/serviceconsumermanagement-gen.go | 37 +- .../v1/servicemanagement-api.json | 10 +- servicemanagement/v1/servicemanagement-gen.go | 37 +- .../v1/servicenetworking-api.json | 10 +- servicenetworking/v1/servicenetworking-gen.go | 37 +- .../v1beta/servicenetworking-api.json | 10 +- .../v1beta/servicenetworking-gen.go | 37 +- serviceusage/v1/serviceusage-api.json | 10 +- serviceusage/v1/serviceusage-gen.go | 37 +- serviceusage/v1beta1/serviceusage-api.json | 10 +- serviceusage/v1beta1/serviceusage-gen.go | 37 +- sheets/v4/sheets-api.json | 25 +- sheets/v4/sheets-gen.go | 28 + spanner/v1/spanner-api.json | 293 +- spanner/v1/spanner-gen.go | 851 +- sqladmin/v1/sqladmin-api.json | 51 +- sqladmin/v1/sqladmin-gen.go | 32 +- sqladmin/v1beta4/sqladmin-api.json | 51 +- sqladmin/v1beta4/sqladmin-gen.go | 32 +- translate/v3/translate-api.json | 79 +- translate/v3/translate-gen.go | 108 +- vmmigration/v1/vmmigration-api.json | 164 +- vmmigration/v1/vmmigration-gen.go | 176 + vmmigration/v1alpha1/vmmigration-api.json | 164 +- vmmigration/v1alpha1/vmmigration-gen.go | 176 + walletobjects/v1/walletobjects-api.json | 49 +- walletobjects/v1/walletobjects-gen.go | 91 +- .../v1/workflowexecutions-api.json | 16 +- .../v1/workflowexecutions-gen.go | 13 + workflows/v1/workflows-api.json | 4 +- workflows/v1/workflows-gen.go | 2 +- workstations/v1/workstations-api.json | 6 +- workstations/v1/workstations-gen.go | 30 +- workstations/v1beta/workstations-api.json | 28 +- workstations/v1beta/workstations-gen.go | 74 +- 176 files changed, 74369 insertions(+), 35192 deletions(-) create mode 100644 adsenseplatform/v1/adsenseplatform-api.json create mode 100644 adsenseplatform/v1/adsenseplatform-gen.go create mode 100644 authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json create mode 100644 authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index dd928dd81f3..cebc85a349e 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240708", + "revision": "20240716", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1742,7 +1742,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "EgressSource" }, @@ -1771,7 +1771,7 @@ "id": "EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -2549,7 +2549,7 @@ "properties": { "vpcSubnetwork": { "$ref": "VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index 0c2e474488c..c656bcdada7 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -920,8 +920,7 @@ type EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -989,8 +988,7 @@ type EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -2253,9 +2251,7 @@ func (s VpcAccessibleServices) MarshalJSON() ([]byte, error) { // VpcNetworkSource: The originating network source in Google Cloud. type VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/adsenseplatform/v1/adsenseplatform-api.json b/adsenseplatform/v1/adsenseplatform-api.json new file mode 100644 index 00000000000..c0c646b06bf --- /dev/null +++ b/adsenseplatform/v1/adsenseplatform-api.json @@ -0,0 +1,721 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/adsense": { + "description": "View and manage your AdSense data" + }, + "https://www.googleapis.com/auth/adsense.readonly": { + "description": "View your AdSense data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://adsenseplatform.googleapis.com/", + "batchPath": "batch", + "canonicalName": "AdSense Platform", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/adsense/platforms/", + "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": "adsenseplatform:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://adsenseplatform.mtls.googleapis.com/", + "name": "adsenseplatform", + "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": { + "platforms": { + "resources": { + "accounts": { + "methods": { + "close": { + "description": "Closes a sub-account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}:close", + "httpMethod": "POST", + "id": "adsenseplatform.platforms.accounts.close", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Account to close. Format: platforms/{platform}/accounts/{account_id}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:close", + "request": { + "$ref": "CloseAccountRequest" + }, + "response": { + "$ref": "CloseAccountResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, + "create": { + "description": "Creates a sub-account.", + "flatPath": "v1/platforms/{platformsId}/accounts", + "httpMethod": "POST", + "id": "adsenseplatform.platforms.accounts.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Platform to create an account for. Format: platforms/{platform}", + "location": "path", + "pattern": "^platforms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/accounts", + "request": { + "$ref": "Account" + }, + "response": { + "$ref": "Account" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, + "get": { + "description": "Gets information about the selected sub-account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}", + "httpMethod": "GET", + "id": "adsenseplatform.platforms.accounts.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Account to get information about. Format: platforms/{platform}/accounts/{account_id}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Account" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly" + ] + }, + "list": { + "description": "Lists a partial view of sub-accounts for a specific parent account.", + "flatPath": "v1/platforms/{platformsId}/accounts", + "httpMethod": "GET", + "id": "adsenseplatform.platforms.accounts.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of accounts to include in the response, used for paging. If unspecified, at most 10000 accounts will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListAccounts` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Platform who parents the accounts. Format: platforms/{platform}", + "location": "path", + "pattern": "^platforms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/accounts", + "response": { + "$ref": "ListAccountsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly" + ] + }, + "lookup": { + "description": "Looks up information about a sub-account for a specified creation_request_id. If no account exists for the given creation_request_id, returns 404.", + "flatPath": "v1/platforms/{platformsId}/accounts:lookup", + "httpMethod": "GET", + "id": "adsenseplatform.platforms.accounts.lookup", + "parameterOrder": [ + "parent" + ], + "parameters": { + "creationRequestId": { + "description": "Optional. The creation_request_id provided when calling createAccount.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Platform who parents the account. Format: platforms/{platform}", + "location": "path", + "pattern": "^platforms/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/accounts:lookup", + "response": { + "$ref": "LookupAccountResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly" + ] + } + }, + "resources": { + "events": { + "methods": { + "create": { + "description": "Creates an account event.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/events", + "httpMethod": "POST", + "id": "adsenseplatform.platforms.accounts.events.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Account to log events about. Format: platforms/{platform}/accounts/{account}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/events", + "request": { + "$ref": "Event" + }, + "response": { + "$ref": "Event" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + } + } + }, + "sites": { + "methods": { + "create": { + "description": "Creates a site for a specified account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/sites", + "httpMethod": "POST", + "id": "adsenseplatform.platforms.accounts.sites.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Account to create site. Format: platforms/{platform}/accounts/{account_id}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sites", + "request": { + "$ref": "Site" + }, + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, + "delete": { + "description": "Deletes a site from a specified account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/sites/{sitesId}", + "httpMethod": "DELETE", + "id": "adsenseplatform.platforms.accounts.sites.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the site to delete. Format: platforms/{platform}/accounts/{account}/sites/{site}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + }, + "get": { + "description": "Gets a site from a specified sub-account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/sites/{sitesId}", + "httpMethod": "GET", + "id": "adsenseplatform.platforms.accounts.sites.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the site to retrieve. Format: platforms/{platform}/accounts/{account}/sites/{site}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Site" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly" + ] + }, + "list": { + "description": "Lists sites for a specific account.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/sites", + "httpMethod": "GET", + "id": "adsenseplatform.platforms.accounts.sites.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of sites to include in the response, used for paging. If unspecified, at most 10000 sites will be returned. The maximum value is 10000; values above 10000 will be coerced to 10000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSites` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The account which owns the sites. Format: platforms/{platform}/accounts/{account}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/sites", + "response": { + "$ref": "ListSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly" + ] + }, + "requestReview": { + "description": "Requests the review of a site. The site should be in REQUIRES_REVIEW or NEEDS_ATTENTION state. Note: Make sure you place an [ad tag](https://developers.google.com/adsense/platforms/direct/ad-tags) on your site before requesting a review.", + "flatPath": "v1/platforms/{platformsId}/accounts/{accountsId}/sites/{sitesId}:requestReview", + "httpMethod": "POST", + "id": "adsenseplatform.platforms.accounts.sites.requestReview", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the site to submit for review. Format: platforms/{platform}/accounts/{account}/sites/{site}", + "location": "path", + "pattern": "^platforms/[^/]+/accounts/[^/]+/sites/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:requestReview", + "response": { + "$ref": "RequestSiteReviewResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adsense" + ] + } + } + } + } + } + } + } + }, + "revision": "20240722", + "rootUrl": "https://adsenseplatform.googleapis.com/", + "schemas": { + "Account": { + "description": "Representation of an Account.", + "id": "Account", + "properties": { + "createTime": { + "description": "Output only. Creation time of the account.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creationRequestId": { + "description": "Required. An opaque token that uniquely identifies the account among all the platform's accounts. This string may contain at most 64 non-whitespace ASCII characters, but otherwise has no predefined structure. However, it is expected to be a platform-specific identifier for the user creating the account, so that only a single account can be created for any given user. This field must not contain any information that is recognizable as personally identifiable information. e.g. it should not be an email address or login name. Once an account has been created, a second attempt to create an account using the same creation_request_id will result in an ALREADY_EXISTS error.", + "type": "string" + }, + "displayName": { + "description": "Display name of this account.", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of the account. Format: platforms/pub-[0-9]+/accounts/pub-[0-9]+", + "readOnly": true, + "type": "string" + }, + "regionCode": { + "description": "Required. Input only. CLDR region code of the country/region of the address. Set this to country code of the child account if known, otherwise to your own country code.", + "type": "string" + }, + "state": { + "description": "Output only. Approval state of the account.", + "enum": [ + "STATE_UNSPECIFIED", + "UNCHECKED", + "APPROVED", + "DISAPPROVED" + ], + "enumDescriptions": [ + "Unspecified.", + "Unchecked.", + "The account is ready to serve ads.", + "The account has been blocked from serving ads." + ], + "readOnly": true, + "type": "string" + }, + "timeZone": { + "$ref": "TimeZone", + "description": "Required. The IANA TZ timezone code of this account. For more information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. This field is used for reporting. It is recommended to set it to the same value for all child accounts." + } + }, + "type": "object" + }, + "Address": { + "description": "Address data.", + "id": "Address", + "properties": { + "address1": { + "description": "First line of address. Max length 64 bytes or 30 characters.", + "type": "string" + }, + "address2": { + "description": "Second line of address. Max length 64 bytes or 30 characters.", + "type": "string" + }, + "city": { + "description": "City. Max length 60 bytes or 30 characters.", + "type": "string" + }, + "company": { + "description": "Name of the company. Max length 255 bytes or 34 characters.", + "type": "string" + }, + "contact": { + "description": "Contact name of the company. Max length 128 bytes or 34 characters.", + "type": "string" + }, + "fax": { + "description": "Fax number with international code (i.e. +441234567890).", + "type": "string" + }, + "phone": { + "description": "Phone number with international code (i.e. +441234567890).", + "type": "string" + }, + "regionCode": { + "description": "Country/Region code. The region is specified as a CLDR region code (e.g. \"US\", \"FR\").", + "type": "string" + }, + "state": { + "description": "State. Max length 60 bytes or 30 characters.", + "type": "string" + }, + "zip": { + "description": "Zip/post code. Max length 10 bytes or 10 characters.", + "type": "string" + } + }, + "type": "object" + }, + "CloseAccountRequest": { + "description": "Request definition for the account close rpc.", + "id": "CloseAccountRequest", + "properties": {}, + "type": "object" + }, + "CloseAccountResponse": { + "description": "Response definition for the account close rpc.", + "id": "CloseAccountResponse", + "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" + }, + "Event": { + "description": "A platform sub-account event to record spam signals.", + "id": "Event", + "properties": { + "eventInfo": { + "$ref": "EventInfo", + "description": "Required. Information associated with the event." + }, + "eventTime": { + "description": "Required. Event timestamp.", + "format": "google-datetime", + "type": "string" + }, + "eventType": { + "description": "Required. Event type.", + "enum": [ + "EVENT_TYPE_UNSPECIFIED", + "LOG_IN_VIA_PLATFORM", + "SIGN_UP_VIA_PLATFORM" + ], + "enumDescriptions": [ + "Do not use. You must set an event type explicitly.", + "Log in via platform.", + "Sign up via platform." + ], + "type": "string" + } + }, + "type": "object" + }, + "EventInfo": { + "description": "Private information for partner recorded events (PII).", + "id": "EventInfo", + "properties": { + "billingAddress": { + "$ref": "Address", + "description": "The billing address of the publisher associated with this event, if available." + }, + "email": { + "description": "Required. The email address that is associated with the publisher when performing the event.", + "type": "string" + } + }, + "type": "object" + }, + "ListAccountsResponse": { + "description": "Response definition for the list accounts rpc.", + "id": "ListAccountsResponse", + "properties": { + "accounts": { + "description": "The Accounts returned in the list response. Represented by a partial view of the Account resource, populating `name` and `creation_request_id`.", + "items": { + "$ref": "Account" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token used to page through accounts. To retrieve the next page of the results, set the next request's \"page_token\" value to this.", + "type": "string" + } + }, + "type": "object" + }, + "ListSitesResponse": { + "description": "Response definition for the site list rpc.", + "id": "ListSitesResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token used to page through sites. To retrieve the next page of the results, set the next request's \"page_token\" value to this.", + "type": "string" + }, + "sites": { + "description": "The sites returned in this list response.", + "items": { + "$ref": "Site" + }, + "type": "array" + } + }, + "type": "object" + }, + "LookupAccountResponse": { + "description": "Response definition for the lookup account rpc.", + "id": "LookupAccountResponse", + "properties": { + "name": { + "description": "The name of the Account Format: platforms/{platform}/accounts/{account_id}", + "type": "string" + } + }, + "type": "object" + }, + "RequestSiteReviewResponse": { + "description": "Response definition for the site request review rpc.", + "id": "RequestSiteReviewResponse", + "properties": {}, + "type": "object" + }, + "Site": { + "description": "Representation of a Site.", + "id": "Site", + "properties": { + "domain": { + "description": "Domain/sub-domain of the site. Must be a valid domain complying with [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode [RFC 3492](https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains unicode characters.", + "type": "string" + }, + "name": { + "description": "Output only. Resource name of a site. Format: platforms/{platform}/accounts/{account}/sites/{site}", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. State of a site.", + "enum": [ + "STATE_UNSPECIFIED", + "REQUIRES_REVIEW", + "GETTING_READY", + "READY", + "NEEDS_ATTENTION" + ], + "enumDescriptions": [ + "State unspecified.", + "Either: - The site hasn't been checked yet. - The site is inactive and needs another review before it can show ads again. Learn how to [request a review for an inactive site](https://support.google.com/adsense/answer/9393996).", + "Google is running some checks on the site. This usually takes a few days, but in some cases it can take two to four weeks.", + "The site is ready to show ads. Learn how to [set up ads on the site](https://support.google.com/adsense/answer/7037624).", + "Publisher needs to fix some issues before the site is ready to show ads. Learn what to do [if a new site isn't ready](https://support.google.com/adsense/answer/9061852)." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "TimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "TimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "AdSense Platform API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/adsenseplatform/v1/adsenseplatform-gen.go b/adsenseplatform/v1/adsenseplatform-gen.go new file mode 100644 index 00000000000..1d24c18dd46 --- /dev/null +++ b/adsenseplatform/v1/adsenseplatform-gen.go @@ -0,0 +1,1783 @@ +// 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 adsenseplatform provides access to the AdSense Platform API. +// +// For product documentation, see: https://developers.google.com/adsense/platforms/ +// +// # 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/adsenseplatform/v1" +// ... +// ctx := context.Background() +// adsenseplatformService, err := adsenseplatform.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 +// +// By default, all available scopes (see "Constants") are used to authenticate. +// To restrict scopes, use [google.golang.org/api/option.WithScopes]: +// +// adsenseplatformService, err := adsenseplatform.NewService(ctx, option.WithScopes(adsenseplatform.AdsenseReadonlyScope)) +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// adsenseplatformService, err := adsenseplatform.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, ...) +// adsenseplatformService, err := adsenseplatform.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package adsenseplatform // import "google.golang.org/api/adsenseplatform/v1" + +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 = "adsenseplatform:v1" +const apiName = "adsenseplatform" +const apiVersion = "v1" +const basePath = "https://adsenseplatform.googleapis.com/" +const basePathTemplate = "https://adsenseplatform.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://adsenseplatform.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your AdSense data + AdsenseScope = "https://www.googleapis.com/auth/adsense" + + // View your AdSense data + AdsenseReadonlyScope = "https://www.googleapis.com/auth/adsense.readonly" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/adsense", + "https://www.googleapis.com/auth/adsense.readonly", + ) + // 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.Platforms = NewPlatformsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Platforms *PlatformsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewPlatformsService(s *Service) *PlatformsService { + rs := &PlatformsService{s: s} + rs.Accounts = NewPlatformsAccountsService(s) + return rs +} + +type PlatformsService struct { + s *Service + + Accounts *PlatformsAccountsService +} + +func NewPlatformsAccountsService(s *Service) *PlatformsAccountsService { + rs := &PlatformsAccountsService{s: s} + rs.Events = NewPlatformsAccountsEventsService(s) + rs.Sites = NewPlatformsAccountsSitesService(s) + return rs +} + +type PlatformsAccountsService struct { + s *Service + + Events *PlatformsAccountsEventsService + + Sites *PlatformsAccountsSitesService +} + +func NewPlatformsAccountsEventsService(s *Service) *PlatformsAccountsEventsService { + rs := &PlatformsAccountsEventsService{s: s} + return rs +} + +type PlatformsAccountsEventsService struct { + s *Service +} + +func NewPlatformsAccountsSitesService(s *Service) *PlatformsAccountsSitesService { + rs := &PlatformsAccountsSitesService{s: s} + return rs +} + +type PlatformsAccountsSitesService struct { + s *Service +} + +// Account: Representation of an Account. +type Account struct { + // CreateTime: Output only. Creation time of the account. + CreateTime string `json:"createTime,omitempty"` + // CreationRequestId: Required. An opaque token that uniquely identifies the + // account among all the platform's accounts. This string may contain at most + // 64 non-whitespace ASCII characters, but otherwise has no predefined + // structure. However, it is expected to be a platform-specific identifier for + // the user creating the account, so that only a single account can be created + // for any given user. This field must not contain any information that is + // recognizable as personally identifiable information. e.g. it should not be + // an email address or login name. Once an account has been created, a second + // attempt to create an account using the same creation_request_id will result + // in an ALREADY_EXISTS error. + CreationRequestId string `json:"creationRequestId,omitempty"` + // DisplayName: Display name of this account. + DisplayName string `json:"displayName,omitempty"` + // Name: Output only. Resource name of the account. Format: + // platforms/pub-[0-9]+/accounts/pub-[0-9]+ + Name string `json:"name,omitempty"` + // RegionCode: Required. Input only. CLDR region code of the country/region of + // the address. Set this to country code of the child account if known, + // otherwise to your own country code. + RegionCode string `json:"regionCode,omitempty"` + // State: Output only. Approval state of the account. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified. + // "UNCHECKED" - Unchecked. + // "APPROVED" - The account is ready to serve ads. + // "DISAPPROVED" - The account has been blocked from serving ads. + State string `json:"state,omitempty"` + // TimeZone: Required. The IANA TZ timezone code of this account. For more + // information, see + // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. This field is + // used for reporting. It is recommended to set it to the same value for all + // child accounts. + TimeZone *TimeZone `json:"timeZone,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 Account) MarshalJSON() ([]byte, error) { + type NoMethod Account + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Address: Address data. +type Address struct { + // Address1: First line of address. Max length 64 bytes or 30 characters. + Address1 string `json:"address1,omitempty"` + // Address2: Second line of address. Max length 64 bytes or 30 characters. + Address2 string `json:"address2,omitempty"` + // City: City. Max length 60 bytes or 30 characters. + City string `json:"city,omitempty"` + // Company: Name of the company. Max length 255 bytes or 34 characters. + Company string `json:"company,omitempty"` + // Contact: Contact name of the company. Max length 128 bytes or 34 characters. + Contact string `json:"contact,omitempty"` + // Fax: Fax number with international code (i.e. +441234567890). + Fax string `json:"fax,omitempty"` + // Phone: Phone number with international code (i.e. +441234567890). + Phone string `json:"phone,omitempty"` + // RegionCode: Country/Region code. The region is specified as a CLDR region + // code (e.g. "US", "FR"). + RegionCode string `json:"regionCode,omitempty"` + // State: State. Max length 60 bytes or 30 characters. + State string `json:"state,omitempty"` + // Zip: Zip/post code. Max length 10 bytes or 10 characters. + Zip string `json:"zip,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address1") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address1") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Address) MarshalJSON() ([]byte, error) { + type NoMethod Address + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CloseAccountRequest: Request definition for the account close rpc. +type CloseAccountRequest struct { +} + +// CloseAccountResponse: Response definition for the account close rpc. +type CloseAccountResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// 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:"-"` +} + +// Event: A platform sub-account event to record spam signals. +type Event struct { + // EventInfo: Required. Information associated with the event. + EventInfo *EventInfo `json:"eventInfo,omitempty"` + // EventTime: Required. Event timestamp. + EventTime string `json:"eventTime,omitempty"` + // EventType: Required. Event type. + // + // Possible values: + // "EVENT_TYPE_UNSPECIFIED" - Do not use. You must set an event type + // explicitly. + // "LOG_IN_VIA_PLATFORM" - Log in via platform. + // "SIGN_UP_VIA_PLATFORM" - Sign up via platform. + EventType string `json:"eventType,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "EventInfo") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EventInfo") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Event) MarshalJSON() ([]byte, error) { + type NoMethod Event + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// EventInfo: Private information for partner recorded events (PII). +type EventInfo struct { + // BillingAddress: The billing address of the publisher associated with this + // event, if available. + BillingAddress *Address `json:"billingAddress,omitempty"` + // Email: Required. The email address that is associated with the publisher + // when performing the event. + Email string `json:"email,omitempty"` + // ForceSendFields is a list of field names (e.g. "BillingAddress") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BillingAddress") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s EventInfo) MarshalJSON() ([]byte, error) { + type NoMethod EventInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAccountsResponse: Response definition for the list accounts rpc. +type ListAccountsResponse struct { + // Accounts: The Accounts returned in the list response. Represented by a + // partial view of the Account resource, populating `name` and + // `creation_request_id`. + Accounts []*Account `json:"accounts,omitempty"` + // NextPageToken: Continuation token used to page through accounts. To retrieve + // the next page of the results, set the next request's "page_token" value to + // this. + 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. "Accounts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Accounts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAccountsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAccountsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListSitesResponse: Response definition for the site list rpc. +type ListSitesResponse struct { + // NextPageToken: Continuation token used to page through sites. To retrieve + // the next page of the results, set the next request's "page_token" value to + // this. + NextPageToken string `json:"nextPageToken,omitempty"` + // Sites: The sites returned in this list response. + Sites []*Site `json:"sites,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 ListSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListSitesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// LookupAccountResponse: Response definition for the lookup account rpc. +type LookupAccountResponse struct { + // Name: The name of the Account Format: + // platforms/{platform}/accounts/{account_id} + 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. "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 LookupAccountResponse) MarshalJSON() ([]byte, error) { + type NoMethod LookupAccountResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// RequestSiteReviewResponse: Response definition for the site request review +// rpc. +type RequestSiteReviewResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// Site: Representation of a Site. +type Site struct { + // Domain: Domain/sub-domain of the site. Must be a valid domain complying with + // RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt) and formatted as punycode + // RFC 3492 (https://www.ietf.org/rfc/rfc3492.txt) in case the domain contains + // unicode characters. + Domain string `json:"domain,omitempty"` + // Name: Output only. Resource name of a site. Format: + // platforms/{platform}/accounts/{account}/sites/{site} + Name string `json:"name,omitempty"` + // State: Output only. State of a site. + // + // Possible values: + // "STATE_UNSPECIFIED" - State unspecified. + // "REQUIRES_REVIEW" - Either: - The site hasn't been checked yet. - The site + // is inactive and needs another review before it can show ads again. Learn how + // to [request a review for an inactive + // site](https://support.google.com/adsense/answer/9393996). + // "GETTING_READY" - Google is running some checks on the site. This usually + // takes a few days, but in some cases it can take two to four weeks. + // "READY" - The site is ready to show ads. Learn how to [set up ads on the + // site](https://support.google.com/adsense/answer/7037624). + // "NEEDS_ATTENTION" - Publisher needs to fix some issues before the site is + // ready to show ads. Learn what to do [if a new site isn't + // ready](https://support.google.com/adsense/answer/9061852). + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Domain") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Domain") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Site) MarshalJSON() ([]byte, error) { + type NoMethod Site + 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) +} + +type PlatformsAccountsCloseCall struct { + s *Service + name string + closeaccountrequest *CloseAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Close: Closes a sub-account. +// +// - name: Account to close. Format: platforms/{platform}/accounts/{account_id}. +func (r *PlatformsAccountsService) Close(name string, closeaccountrequest *CloseAccountRequest) *PlatformsAccountsCloseCall { + c := &PlatformsAccountsCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.closeaccountrequest = closeaccountrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PlatformsAccountsCloseCall) Fields(s ...googleapi.Field) *PlatformsAccountsCloseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsCloseCall) Context(ctx context.Context) *PlatformsAccountsCloseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsCloseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsCloseCall) 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.closeaccountrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:close") + 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 "adsenseplatform.platforms.accounts.close" call. +// Any non-2xx status code is an error. Response headers are in either +// *CloseAccountResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PlatformsAccountsCloseCall) Do(opts ...googleapi.CallOption) (*CloseAccountResponse, 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 := &CloseAccountResponse{ + 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 PlatformsAccountsCreateCall struct { + s *Service + parent string + account *Account + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a sub-account. +// +// - parent: Platform to create an account for. Format: platforms/{platform}. +func (r *PlatformsAccountsService) Create(parent string, account *Account) *PlatformsAccountsCreateCall { + c := &PlatformsAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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 *PlatformsAccountsCreateCall) Fields(s ...googleapi.Field) *PlatformsAccountsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsCreateCall) Context(ctx context.Context) *PlatformsAccountsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsCreateCall) 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, "v1/{+parent}/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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "adsenseplatform.platforms.accounts.create" 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 *PlatformsAccountsCreateCall) 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 +} + +type PlatformsAccountsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about the selected sub-account. +// +// - name: Account to get information about. Format: +// platforms/{platform}/accounts/{account_id}. +func (r *PlatformsAccountsService) Get(name string) *PlatformsAccountsGetCall { + c := &PlatformsAccountsGetCall{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 *PlatformsAccountsGetCall) Fields(s ...googleapi.Field) *PlatformsAccountsGetCall { + 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 *PlatformsAccountsGetCall) IfNoneMatch(entityTag string) *PlatformsAccountsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsGetCall) Context(ctx context.Context) *PlatformsAccountsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsGetCall) 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 "adsenseplatform.platforms.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 *PlatformsAccountsGetCall) 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 +} + +type PlatformsAccountsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists a partial view of sub-accounts for a specific parent account. +// +// - parent: Platform who parents the accounts. Format: platforms/{platform}. +func (r *PlatformsAccountsService) List(parent string) *PlatformsAccountsListCall { + c := &PlatformsAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// accounts to include in the response, used for paging. If unspecified, at +// most 10000 accounts will be returned. The maximum value is 10000; values +// above 10000 will be coerced to 10000. +func (c *PlatformsAccountsListCall) PageSize(pageSize int64) *PlatformsAccountsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListAccounts` call. Provide this to retrieve the subsequent +// page. +func (c *PlatformsAccountsListCall) PageToken(pageToken string) *PlatformsAccountsListCall { + 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 *PlatformsAccountsListCall) Fields(s ...googleapi.Field) *PlatformsAccountsListCall { + 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 *PlatformsAccountsListCall) IfNoneMatch(entityTag string) *PlatformsAccountsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsListCall) Context(ctx context.Context) *PlatformsAccountsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsListCall) 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}/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{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "adsenseplatform.platforms.accounts.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAccountsResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PlatformsAccountsListCall) Do(opts ...googleapi.CallOption) (*ListAccountsResponse, 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 := &ListAccountsResponse{ + 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 *PlatformsAccountsListCall) Pages(ctx context.Context, f func(*ListAccountsResponse) 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 PlatformsAccountsLookupCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Lookup: Looks up information about a sub-account for a specified +// creation_request_id. If no account exists for the given creation_request_id, +// returns 404. +// +// - parent: Platform who parents the account. Format: platforms/{platform}. +func (r *PlatformsAccountsService) Lookup(parent string) *PlatformsAccountsLookupCall { + c := &PlatformsAccountsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// CreationRequestId sets the optional parameter "creationRequestId": The +// creation_request_id provided when calling createAccount. +func (c *PlatformsAccountsLookupCall) CreationRequestId(creationRequestId string) *PlatformsAccountsLookupCall { + c.urlParams_.Set("creationRequestId", creationRequestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PlatformsAccountsLookupCall) Fields(s ...googleapi.Field) *PlatformsAccountsLookupCall { + 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 *PlatformsAccountsLookupCall) IfNoneMatch(entityTag string) *PlatformsAccountsLookupCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsLookupCall) Context(ctx context.Context) *PlatformsAccountsLookupCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsLookupCall) 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}/accounts:lookup") + 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 "adsenseplatform.platforms.accounts.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *LookupAccountResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PlatformsAccountsLookupCall) Do(opts ...googleapi.CallOption) (*LookupAccountResponse, 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 := &LookupAccountResponse{ + 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 PlatformsAccountsEventsCreateCall struct { + s *Service + parent string + event *Event + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an account event. +// +// - parent: Account to log events about. Format: +// platforms/{platform}/accounts/{account}. +func (r *PlatformsAccountsEventsService) Create(parent string, event *Event) *PlatformsAccountsEventsCreateCall { + c := &PlatformsAccountsEventsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.event = event + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PlatformsAccountsEventsCreateCall) Fields(s ...googleapi.Field) *PlatformsAccountsEventsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsEventsCreateCall) Context(ctx context.Context) *PlatformsAccountsEventsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsEventsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsEventsCreateCall) 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.event) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/events") + 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 "adsenseplatform.platforms.accounts.events.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Event.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *PlatformsAccountsEventsCreateCall) Do(opts ...googleapi.CallOption) (*Event, 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 := &Event{ + 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 PlatformsAccountsSitesCreateCall struct { + s *Service + parent string + site *Site + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a site for a specified account. +// +// - parent: Account to create site. Format: +// platforms/{platform}/accounts/{account_id}. +func (r *PlatformsAccountsSitesService) Create(parent string, site *Site) *PlatformsAccountsSitesCreateCall { + c := &PlatformsAccountsSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.site = site + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PlatformsAccountsSitesCreateCall) Fields(s ...googleapi.Field) *PlatformsAccountsSitesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsSitesCreateCall) Context(ctx context.Context) *PlatformsAccountsSitesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsSitesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsSitesCreateCall) 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.site) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sites") + 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 "adsenseplatform.platforms.accounts.sites.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Site.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *PlatformsAccountsSitesCreateCall) Do(opts ...googleapi.CallOption) (*Site, 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 := &Site{ + 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 PlatformsAccountsSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a site from a specified account. +// +// - name: The name of the site to delete. Format: +// platforms/{platform}/accounts/{account}/sites/{site}. +func (r *PlatformsAccountsSitesService) Delete(name string) *PlatformsAccountsSitesDeleteCall { + c := &PlatformsAccountsSitesDeleteCall{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 *PlatformsAccountsSitesDeleteCall) Fields(s ...googleapi.Field) *PlatformsAccountsSitesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsSitesDeleteCall) Context(ctx context.Context) *PlatformsAccountsSitesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsSitesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsSitesDeleteCall) 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 "adsenseplatform.platforms.accounts.sites.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 *PlatformsAccountsSitesDeleteCall) 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 PlatformsAccountsSitesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a site from a specified sub-account. +// +// - name: The name of the site to retrieve. Format: +// platforms/{platform}/accounts/{account}/sites/{site}. +func (r *PlatformsAccountsSitesService) Get(name string) *PlatformsAccountsSitesGetCall { + c := &PlatformsAccountsSitesGetCall{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 *PlatformsAccountsSitesGetCall) Fields(s ...googleapi.Field) *PlatformsAccountsSitesGetCall { + 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 *PlatformsAccountsSitesGetCall) IfNoneMatch(entityTag string) *PlatformsAccountsSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsSitesGetCall) Context(ctx context.Context) *PlatformsAccountsSitesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsSitesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsSitesGetCall) 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 "adsenseplatform.platforms.accounts.sites.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Site.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *PlatformsAccountsSitesGetCall) Do(opts ...googleapi.CallOption) (*Site, 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 := &Site{ + 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 PlatformsAccountsSitesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists sites for a specific account. +// +// - parent: The account which owns the sites. Format: +// platforms/{platform}/accounts/{account}. +func (r *PlatformsAccountsSitesService) List(parent string) *PlatformsAccountsSitesListCall { + c := &PlatformsAccountsSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of sites +// to include in the response, used for paging. If unspecified, at most 10000 +// sites will be returned. The maximum value is 10000; values above 10000 will +// be coerced to 10000. +func (c *PlatformsAccountsSitesListCall) PageSize(pageSize int64) *PlatformsAccountsSitesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSites` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListSites` must +// match the call that provided the page token. +func (c *PlatformsAccountsSitesListCall) PageToken(pageToken string) *PlatformsAccountsSitesListCall { + 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 *PlatformsAccountsSitesListCall) Fields(s ...googleapi.Field) *PlatformsAccountsSitesListCall { + 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 *PlatformsAccountsSitesListCall) IfNoneMatch(entityTag string) *PlatformsAccountsSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsSitesListCall) Context(ctx context.Context) *PlatformsAccountsSitesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsSitesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsSitesListCall) 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}/sites") + 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 "adsenseplatform.platforms.accounts.sites.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListSitesResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PlatformsAccountsSitesListCall) Do(opts ...googleapi.CallOption) (*ListSitesResponse, 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 := &ListSitesResponse{ + 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 *PlatformsAccountsSitesListCall) Pages(ctx context.Context, f func(*ListSitesResponse) 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 PlatformsAccountsSitesRequestReviewCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RequestReview: Requests the review of a site. The site should be in +// REQUIRES_REVIEW or NEEDS_ATTENTION state. Note: Make sure you place an ad +// tag (https://developers.google.com/adsense/platforms/direct/ad-tags) on your +// site before requesting a review. +// +// - name: The name of the site to submit for review. Format: +// platforms/{platform}/accounts/{account}/sites/{site}. +func (r *PlatformsAccountsSitesService) RequestReview(name string) *PlatformsAccountsSitesRequestReviewCall { + c := &PlatformsAccountsSitesRequestReviewCall{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 *PlatformsAccountsSitesRequestReviewCall) Fields(s ...googleapi.Field) *PlatformsAccountsSitesRequestReviewCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *PlatformsAccountsSitesRequestReviewCall) Context(ctx context.Context) *PlatformsAccountsSitesRequestReviewCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PlatformsAccountsSitesRequestReviewCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *PlatformsAccountsSitesRequestReviewCall) 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}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "adsenseplatform.platforms.accounts.sites.requestReview" call. +// Any non-2xx status code is an error. Response headers are in either +// *RequestSiteReviewResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PlatformsAccountsSitesRequestReviewCall) Do(opts ...googleapi.CallOption) (*RequestSiteReviewResponse, 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 := &RequestSiteReviewResponse{ + 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/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index b6f2c72bbb1..979ee1d3cea 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -1391,7 +1391,7 @@ ], "parameters": { "name": { - "description": "Output only. The resource name of the Dataset.", + "description": "Output only. Identifier. The resource name of the Dataset.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -2268,7 +2268,7 @@ ], "parameters": { "name": { - "description": "Output only. The resource name of the DatasetVersion.", + "description": "Output only. Identifier. The resource name of the DatasetVersion.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/datasetVersions/[^/]+$", "required": true, @@ -11179,6 +11179,167 @@ } }, "notebookExecutionJobs": { + "methods": { + "create": { + "description": "Creates a NotebookExecutionJob.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.notebookExecutionJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "notebookExecutionJobId": { + "description": "Optional. User specified ID for the NotebookExecutionJob.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Location to create the NotebookExecutionJob. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/notebookExecutionJobs", + "request": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJob" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a NotebookExecutionJob.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.notebookExecutionJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookExecutionJob resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a NotebookExecutionJob.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs/{notebookExecutionJobsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.notebookExecutionJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the NotebookExecutionJob resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/notebookExecutionJobs/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The NotebookExecutionJob view. Defaults to BASIC.", + "enum": [ + "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED", + "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC", + "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" + ], + "enumDescriptions": [ + "When unspecified, the API defaults to the BASIC view.", + "Includes all fields except for direct notebook inputs.", + "Includes all fields." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists NotebookExecutionJobs in a Location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/notebookExecutionJobs", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.notebookExecutionJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookExecutionJob` supports = and !=. `notebookExecutionJob` represents the NotebookExecutionJob ID. * `displayName` supports = and != and regex. * `schedule` supports = and != and regex. Some examples: * `notebookExecutionJob=\"123\"` * `notebookExecutionJob=\"my-execution-job\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"`", + "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. Supported fields: * `display_name` * `create_time` * `update_time` Example: `display_name, create_time desc`.", + "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. Typically obtained via ListNotebookExecutionJobs.next_page_token of the previous NotebookService.ListNotebookExecutionJobs call.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Location from which to list the NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "view": { + "description": "Optional. The NotebookExecutionJob view. Defaults to BASIC.", + "enum": [ + "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED", + "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC", + "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" + ], + "enumDescriptions": [ + "When unspecified, the API defaults to the BASIC view.", + "Includes all fields except for direct notebook inputs.", + "Includes all fields." + ], + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/notebookExecutionJobs", + "response": { + "$ref": "GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -16767,8 +16928,13 @@ "name" ], "parameters": { + "isHuggingFaceModel": { + "description": "Optional. Boolean indicates whether the requested model is a Hugging Face model.", + "location": "query", + "type": "boolean" + }, "languageCode": { - "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher model's text information should be written in (see go/bcp47).", + "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher model's text information should be written in.", "location": "query", "type": "string" }, @@ -16810,11 +16976,11 @@ } } }, - "revision": "20240703", + "revision": "20240715", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { - "description": "Next ID: 8 Generate video response.", + "description": "Generate video response.", "id": "CloudAiLargeModelsVisionGenerateVideoResponse", "properties": { "generatedSamples": { @@ -16835,10 +17001,6 @@ "type": "string" }, "type": "array" - }, - "reportingMetrics": { - "$ref": "IntelligenceCloudAutomlXpsReportingMetrics", - "description": "Billable prediction metrics." } }, "type": "object" @@ -18444,6 +18606,12 @@ }, "readOnly": true, "type": "array" + }, + "score": { + "description": "Output only. Confidence score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" } }, "type": "object" @@ -18655,21 +18823,21 @@ "id": "GoogleCloudAiplatformV1ComputeTokensRequest", "properties": { "contents": { - "description": "Required. Input content.", + "description": "Optional. Input content.", "items": { "$ref": "GoogleCloudAiplatformV1Content" }, "type": "array" }, "instances": { - "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", + "description": "Optional. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", "items": { "type": "any" }, "type": "array" }, "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", + "description": "Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", "type": "string" } }, @@ -18871,22 +19039,33 @@ "id": "GoogleCloudAiplatformV1CountTokensRequest", "properties": { "contents": { - "description": "Required. Input content.", + "description": "Optional. Input content.", "items": { "$ref": "GoogleCloudAiplatformV1Content" }, "type": "array" }, "instances": { - "description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", + "description": "Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { "type": "any" }, "type": "array" }, "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Optional. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudAiplatformV1Content", + "description": "Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." + }, + "tools": { + "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "items": { + "$ref": "GoogleCloudAiplatformV1Tool" + }, + "type": "array" } }, "type": "object" @@ -19089,6 +19268,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata": { + "description": "Metadata information for NotebookService.CreateNotebookExecutionJob.", + "id": "GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata", + "properties": { + "genericMetadata": { + "$ref": "GoogleCloudAiplatformV1GenericOperationMetadata", + "description": "The operation generic information." + }, + "progressMessage": { + "description": "A human-readable message that shows the intermediate progress details of NotebookRuntime.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata": { "description": "Metadata information for NotebookService.CreateNotebookRuntimeTemplate.", "id": "GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata", @@ -19648,7 +19842,7 @@ "type": "string" }, "name": { - "description": "Output only. The resource name of the Dataset.", + "description": "Output only. Identifier. The resource name of the Dataset.", "readOnly": true, "type": "string" }, @@ -19702,7 +19896,7 @@ "type": "string" }, "name": { - "description": "Output only. The resource name of the DatasetVersion.", + "description": "Output only. Identifier. The resource name of the DatasetVersion.", "readOnly": true, "type": "string" }, @@ -20313,6 +20507,15 @@ "readOnly": true, "type": "string" }, + "dedicatedEndpointDns": { + "description": "Output only. DNS of the dedicated endpoint. Will only be populated if dedicated_endpoint_enabled is true. Format: `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`.", + "readOnly": true, + "type": "string" + }, + "dedicatedEndpointEnabled": { + "description": "If true, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitation will be removed soon.", + "type": "boolean" + }, "deployedModels": { "description": "Output only. The models deployed in this Endpoint. To add or remove DeployedModels use EndpointService.DeployModel and EndpointService.UndeployModel respectively.", "items": { @@ -23546,45 +23749,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1GroundingAttribution": { - "description": "Grounding attribution.", - "id": "GoogleCloudAiplatformV1GroundingAttribution", - "properties": { - "confidenceScore": { - "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", - "format": "float", - "readOnly": true, - "type": "number" - }, - "segment": { - "$ref": "GoogleCloudAiplatformV1Segment", - "description": "Output only. Segment of the content this attribution belongs to.", - "readOnly": true - }, - "web": { - "$ref": "GoogleCloudAiplatformV1GroundingAttributionWeb", - "description": "Optional. Attribution from the web." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1GroundingAttributionWeb": { - "description": "Attribution from the web.", - "id": "GoogleCloudAiplatformV1GroundingAttributionWeb", - "properties": { - "title": { - "description": "Output only. Title of the attribution.", - "readOnly": true, - "type": "string" - }, - "uri": { - "description": "Output only. URI reference of the attribution.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1GroundingChunk": { "description": "Grounding chunk.", "id": "GoogleCloudAiplatformV1GroundingChunk", @@ -23634,13 +23798,6 @@ "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1GroundingMetadata", "properties": { - "groundingAttributions": { - "description": "Optional. List of grounding attributions.", - "items": { - "$ref": "GoogleCloudAiplatformV1GroundingAttribution" - }, - "type": "array" - }, "groundingChunks": { "description": "List of supporting references retrieved from specified grounding source.", "items": { @@ -25082,6 +25239,24 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse": { + "description": "Response message for [NotebookService.CreateNotebookExecutionJob]", + "id": "GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass to ListNotebookExecutionJobs.page_token to obtain that page.", + "type": "string" + }, + "notebookExecutionJobs": { + "description": "List of NotebookExecutionJobs in the requested page.", + "items": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJob" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse": { "description": "Response message for NotebookService.ListNotebookRuntimeTemplates.", "id": "GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse", @@ -27420,6 +27595,13 @@ "format": "int32", "type": "integer" }, + "numericFilters": { + "description": "Optional. The list of numeric filters.", + "items": { + "$ref": "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter" + }, + "type": "array" + }, "parameters": { "$ref": "GoogleCloudAiplatformV1NearestNeighborQueryParameters", "description": "Optional. Parameters that can be set to tune query on the fly." @@ -27454,6 +27636,54 @@ }, "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", + "id": "GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter", + "properties": { + "name": { + "description": "Required. Column name in BigQuery that used as filters.", + "type": "string" + }, + "op": { + "description": "Optional. This MUST be specified for queries and must NOT be specified for database points.", + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS", + "LESS_EQUAL", + "EQUAL", + "GREATER_EQUAL", + "GREATER", + "NOT_EQUAL" + ], + "enumDescriptions": [ + "Unspecified operator.", + "Entities are eligible if their value is \u003c the query's.", + "Entities are eligible if their value is \u003c= the query's.", + "Entities are eligible if their value is == the query's.", + "Entities are eligible if their value is \u003e= the query's.", + "Entities are eligible if their value is \u003e the query's.", + "Entities are eligible if their value is != the query's." + ], + "type": "string" + }, + "valueDouble": { + "description": "double value type.", + "format": "double", + "type": "number" + }, + "valueFloat": { + "description": "float value type.", + "format": "float", + "type": "number" + }, + "valueInt": { + "description": "int value type.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1NearestNeighborQueryParameters": { "description": "Parameters that can be overrided in each query to tune query latency and recall.", "id": "GoogleCloudAiplatformV1NearestNeighborQueryParameters", @@ -27724,6 +27954,159 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1NotebookExecutionJob": { + "description": "NotebookExecutionJob represents an instance of a notebook execution.", + "id": "GoogleCloudAiplatformV1NotebookExecutionJob", + "properties": { + "createTime": { + "description": "Output only. Timestamp when this NotebookExecutionJob was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataformRepositorySource": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource", + "description": "The Dataform Repository pointing to a single file notebook repository." + }, + "directNotebookSource": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource", + "description": "The contents of an input notebook file." + }, + "displayName": { + "description": "The display name of the NotebookExecutionJob. The name can be up to 128 characters long and can consist of any UTF-8 characters.", + "type": "string" + }, + "executionTimeout": { + "description": "Max running time of the execution job in seconds (default 86400s / 24 hrs).", + "format": "google-duration", + "type": "string" + }, + "executionUser": { + "description": "The user email to run the execution as. Only supported by Colab runtimes.", + "type": "string" + }, + "gcsNotebookSource": { + "$ref": "GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource", + "description": "The Cloud Storage url pointing to the ipynb file. Format: `gs://bucket/notebook_file.ipynb`" + }, + "gcsOutputUri": { + "description": "The Cloud Storage location to upload the result to. Format: `gs://bucket-name`", + "type": "string" + }, + "jobState": { + "description": "Output only. The state of the NotebookExecutionJob.", + "enum": [ + "JOB_STATE_UNSPECIFIED", + "JOB_STATE_QUEUED", + "JOB_STATE_PENDING", + "JOB_STATE_RUNNING", + "JOB_STATE_SUCCEEDED", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLING", + "JOB_STATE_CANCELLED", + "JOB_STATE_PAUSED", + "JOB_STATE_EXPIRED", + "JOB_STATE_UPDATING", + "JOB_STATE_PARTIALLY_SUCCEEDED" + ], + "enumDescriptions": [ + "The job state is unspecified.", + "The job has been just created or resumed and processing has not yet begun.", + "The service is preparing to run the job.", + "The job is in progress.", + "The job completed successfully.", + "The job failed.", + "The job is being cancelled. From this state the job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.", + "The job has been cancelled.", + "The job has been stopped, and can be resumed.", + "The job has expired.", + "The job is being updated. Only jobs in the `RUNNING` state can be updated. After updating, the job goes back to the `RUNNING` state.", + "The job is partially succeeded, some results may be missing due to errors." + ], + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels with user-defined metadata to organize NotebookExecutionJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with \"aiplatform.googleapis.com/\" and are immutable.", + "type": "object" + }, + "name": { + "description": "Output only. The resource name of this NotebookExecutionJob. Format: `projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}`", + "readOnly": true, + "type": "string" + }, + "notebookRuntimeTemplateResourceName": { + "description": "The NotebookRuntimeTemplate to source compute configuration from.", + "type": "string" + }, + "scheduleResourceName": { + "description": "Output only. The Schedule resource name if this job is triggered by one. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}`", + "readOnly": true, + "type": "string" + }, + "serviceAccount": { + "description": "The service account to run the execution as.", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "Output only. Populated when the NotebookExecutionJob is completed. When there is an error during notebook execution, the error details are populated.", + "readOnly": true + }, + "updateTime": { + "description": "Output only. Timestamp when this NotebookExecutionJob was most recently updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource": { + "description": "The Dataform Repository containing the input notebook.", + "id": "GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource", + "properties": { + "commitSha": { + "description": "The commit SHA to read repository with. If unset, the file will be read at HEAD.", + "type": "string" + }, + "dataformRepositoryResourceName": { + "description": "The resource name of the Dataform Repository. Format: `projects/{project_id}/locations/{location}/repositories/{repository_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource": { + "description": "The content of the input notebook in ipynb format.", + "id": "GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource", + "properties": { + "content": { + "description": "The base64-encoded contents of the input notebook file.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource": { + "description": "The Cloud Storage uri for the input notebook.", + "id": "GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource", + "properties": { + "generation": { + "description": "The version of the Cloud Storage object to read. If unset, the current version of the object is read. See https://cloud.google.com/storage/docs/metadata#generation-number.", + "type": "string" + }, + "uri": { + "description": "The Cloud Storage uri pointing to the ipynb file. Format: `gs://bucket/notebook_file.ipynb`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1NotebookIdleShutdownConfig": { "description": "The idle shutdown configuration of NotebookRuntimeTemplate, which contains the idle_timeout as required field.", "id": "GoogleCloudAiplatformV1NotebookIdleShutdownConfig", @@ -28290,6 +28673,10 @@ "description": "Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network.", "type": "string" }, + "pscInterfaceConfig": { + "$ref": "GoogleCloudAiplatformV1PscInterfaceConfig", + "description": "Optional. Configuration for PSC-I for PersistentResource." + }, "reservedIpRanges": { "description": "Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].", "items": { @@ -29072,6 +29459,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PscInterfaceConfig": { + "description": "Configuration for PSC-I.", + "id": "GoogleCloudAiplatformV1PscInterfaceConfig", + "properties": { + "networkAttachment": { + "description": "Optional. The full name of the Compute Engine [network attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to attach to the resource. For example, `projects/12345/regions/us-central1/networkAttachments/myNA`. is of the form `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. Where {project} is a project number, as in `12345`, and {networkAttachment} is a network attachment name. To specify this field, you must have already [created a network attachment] (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). This field is only used for resources using PSC-I.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PublisherModel": { "description": "A Model Garden Publisher Model.", "id": "GoogleCloudAiplatformV1PublisherModel", @@ -29945,6 +30343,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1RayLogsSpec": { + "description": "Configuration for the Ray OSS Logs.", + "id": "GoogleCloudAiplatformV1RayLogsSpec", + "properties": { + "disabled": { + "description": "Optional. Flag to disable the export of Ray OSS logs to Cloud Logging.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1RayMetricSpec": { "description": "Configuration for the Ray metrics.", "id": "GoogleCloudAiplatformV1RayMetricSpec", @@ -29968,6 +30377,10 @@ "description": "Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.", "type": "string" }, + "rayLogsSpec": { + "$ref": "GoogleCloudAiplatformV1RayLogsSpec", + "description": "Optional. OSS Ray logging configurations." + }, "rayMetricSpec": { "$ref": "GoogleCloudAiplatformV1RayMetricSpec", "description": "Optional. Ray metrics configurations." @@ -30375,7 +30788,8 @@ "id": "GoogleCloudAiplatformV1Retrieval", "properties": { "disableAttribution": { - "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "deprecated": true, + "description": "Optional. Deprecated. This option is no longer supported.", "type": "boolean" }, "vertexAiSearch": { @@ -30935,6 +31349,20 @@ "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" }, + "strategy": { + "description": "Optional. This determines which type of scheduling strategy to use.", + "enum": [ + "STRATEGY_UNSPECIFIED", + "ON_DEMAND", + "LOW_COST" + ], + "enumDescriptions": [ + "Strategy will default to ON_DEMAND.", + "Regular on-demand provisioning strategy.", + "Low cost by making potential use of spot resources." + ], + "type": "string" + }, "timeout": { "description": "The maximum job running time. The default is 7 days.", "format": "google-duration", @@ -32193,6 +32621,7 @@ "id": "GoogleCloudAiplatformV1SchemaPredictParamsGroundingConfig", "properties": { "disableAttribution": { + "deprecated": true, "description": "If set, skip finding claim attributions (i.e not generate grounding citation).", "type": "boolean" }, @@ -36132,14 +36561,16 @@ "ADAPTER_SIZE_ONE", "ADAPTER_SIZE_FOUR", "ADAPTER_SIZE_EIGHT", - "ADAPTER_SIZE_SIXTEEN" + "ADAPTER_SIZE_SIXTEEN", + "ADAPTER_SIZE_THIRTY_TWO" ], "enumDescriptions": [ "Adapter size is unspecified.", "Adapter size 1.", "Adapter size 4.", "Adapter size 8.", - "Adapter size 16." + "Adapter size 16.", + "Adapter size 32." ], "type": "string" }, @@ -38486,70 +38917,6 @@ } }, "type": "object" - }, - "IntelligenceCloudAutomlXpsMetricEntry": { - "id": "IntelligenceCloudAutomlXpsMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "IntelligenceCloudAutomlXpsMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "IntelligenceCloudAutomlXpsMetricEntryLabel": { - "id": "IntelligenceCloudAutomlXpsMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "IntelligenceCloudAutomlXpsReportingMetrics": { - "id": "IntelligenceCloudAutomlXpsReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "IntelligenceCloudAutomlXpsMetricEntry" - }, - "type": "array" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index 0ab78f97e4b..a3d14194b92 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1337,8 +1337,7 @@ type PublishersModelsService struct { s *Service } -// CloudAiLargeModelsVisionGenerateVideoResponse: Next ID: 8 Generate video -// response. +// CloudAiLargeModelsVisionGenerateVideoResponse: Generate video response. type CloudAiLargeModelsVisionGenerateVideoResponse struct { // GeneratedSamples: The generates samples. GeneratedSamples []*CloudAiLargeModelsVisionMedia `json:"generatedSamples,omitempty"` @@ -1347,8 +1346,6 @@ type CloudAiLargeModelsVisionGenerateVideoResponse struct { RaiMediaFilteredCount int64 `json:"raiMediaFilteredCount,omitempty"` // RaiMediaFilteredReasons: Returns rai failure reasons if any. RaiMediaFilteredReasons []string `json:"raiMediaFilteredReasons,omitempty"` - // ReportingMetrics: Billable prediction metrics. - ReportingMetrics *IntelligenceCloudAutomlXpsReportingMetrics `json:"reportingMetrics,omitempty"` // ForceSendFields is a list of field names (e.g. "GeneratedSamples") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3715,6 +3712,8 @@ 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"` + // Score: Output only. Confidence score of the candidate. + Score float64 `json:"score,omitempty"` // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3733,6 +3732,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 { + 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 +} + // GoogleCloudAiplatformV1CheckTrialEarlyStoppingStateMetatdata: This message // will be placed in the metadata field of a google.longrunning.Operation // associated with a CheckTrialEarlyStoppingState request. @@ -4027,13 +4040,13 @@ func (s GoogleCloudAiplatformV1CompletionStats) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1ComputeTokensRequest: Request message for // ComputeTokens RPC call. type GoogleCloudAiplatformV1ComputeTokensRequest struct { - // Contents: Required. Input content. + // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` - // Instances: Required. The instances that are the input to token computing API + // Instances: Optional. The instances that are the input to token computing API // call. Schema is identical to the prediction schema of the text model, even // for the non-text models, like chat models, or Codey models. Instances []interface{} `json:"instances,omitempty"` - // Model: Required. The name of the publisher model requested to serve the + // Model: Optional. The name of the publisher model requested to serve the // prediction. Format: // projects/{project}/locations/{location}/publishers/*/models/* Model string `json:"model,omitempty"` @@ -4322,15 +4335,24 @@ func (s GoogleCloudAiplatformV1CopyModelResponse) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1CountTokensRequest struct { - // Contents: Required. Input content. + // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1Content `json:"contents,omitempty"` - // Instances: Required. The instances that are the input to token counting + // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` - // Model: Required. The name of the publisher model requested to serve the + // Model: Optional. The name of the publisher model requested to serve the // prediction. Format: // `projects/{project}/locations/{location}/publishers/*/models/*` Model string `json:"model,omitempty"` + // SystemInstruction: Optional. The user provided system instructions for the + // model. Note: only text should be used in parts and content in each part will + // be in a separate paragraph. + SystemInstruction *GoogleCloudAiplatformV1Content `json:"systemInstruction,omitempty"` + // Tools: Optional. A list of `Tools` the model may use to generate the next + // response. A `Tool` is a piece of code that enables the system to interact + // with external systems to perform an action, or set of actions, outside of + // knowledge and scope of the model. + Tools []*GoogleCloudAiplatformV1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4744,6 +4766,32 @@ func (s GoogleCloudAiplatformV1CreateMetadataStoreOperationMetadata) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata: Metadata +// information for NotebookService.CreateNotebookExecutionJob. +type GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ProgressMessage: A human-readable message that shows the intermediate + // progress details of NotebookRuntime. + ProgressMessage string `json:"progressMessage,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 GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1CreateNotebookExecutionJobOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata: // Metadata information for NotebookService.CreateNotebookRuntimeTemplate. type GoogleCloudAiplatformV1CreateNotebookRuntimeTemplateOperationMetadata struct { @@ -5441,7 +5489,7 @@ type GoogleCloudAiplatformV1Dataset struct { // ModelReference: Optional. Reference to the public base model last used by // the dataset. Only set for prompt datasets. ModelReference string `json:"modelReference,omitempty"` - // Name: Output only. The resource name of the Dataset. + // Name: Output only. Identifier. The resource name of the Dataset. Name string `json:"name,omitempty"` // SavedQueries: All SavedQueries belong to the Dataset will be returned in // List/Get Dataset response. The annotation_specs field will not be populated @@ -5491,7 +5539,7 @@ type GoogleCloudAiplatformV1DatasetVersion struct { // ModelReference: Output only. Reference to the public base model last used by // the dataset version. Only set for prompt dataset versions. ModelReference string `json:"modelReference,omitempty"` - // Name: Output only. The resource name of the DatasetVersion. + // Name: Output only. Identifier. The resource name of the DatasetVersion. Name string `json:"name,omitempty"` // UpdateTime: Output only. Timestamp when this DatasetVersion was last // updated. @@ -6550,6 +6598,17 @@ func (s GoogleCloudAiplatformV1EncryptionSpec) MarshalJSON() ([]byte, error) { type GoogleCloudAiplatformV1Endpoint struct { // CreateTime: Output only. Timestamp when this Endpoint was created. CreateTime string `json:"createTime,omitempty"` + // DedicatedEndpointDns: Output only. DNS of the dedicated endpoint. Will only + // be populated if dedicated_endpoint_enabled is true. Format: + // `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`. + DedicatedEndpointDns string `json:"dedicatedEndpointDns,omitempty"` + // DedicatedEndpointEnabled: If true, the endpoint will be exposed through a + // dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the + // dedicated DNS will be isolated from other users' traffic and will have + // better performance and reliability. Note: Once you enabled dedicated + // endpoint, you won't be able to send request to the shared DNS + // {region}-aiplatform.googleapis.com. The limitation will be removed soon. + DedicatedEndpointEnabled bool `json:"dedicatedEndpointEnabled,omitempty"` // DeployedModels: Output only. The models deployed in this Endpoint. To add or // remove DeployedModels use EndpointService.DeployModel and // EndpointService.UndeployModel respectively. @@ -11265,71 +11324,6 @@ func (s GoogleCloudAiplatformV1GroundednessSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1GroundingAttribution: Grounding attribution. -type GoogleCloudAiplatformV1GroundingAttribution struct { - // ConfidenceScore: Optional. Output only. Confidence score of the attribution. - // Ranges from 0 to 1. 1 is the most confident. - ConfidenceScore float64 `json:"confidenceScore,omitempty"` - // Segment: Output only. Segment of the content this attribution belongs to. - Segment *GoogleCloudAiplatformV1Segment `json:"segment,omitempty"` - // Web: Optional. Attribution from the web. - Web *GoogleCloudAiplatformV1GroundingAttributionWeb `json:"web,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceScore") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1GroundingAttribution) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1GroundingAttribution - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1GroundingAttribution) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1GroundingAttribution - var s1 struct { - ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceScore = float64(s1.ConfidenceScore) - return nil -} - -// GoogleCloudAiplatformV1GroundingAttributionWeb: Attribution from the web. -type GoogleCloudAiplatformV1GroundingAttributionWeb struct { - // Title: Output only. Title of the attribution. - Title string `json:"title,omitempty"` - // Uri: Output only. URI reference of the attribution. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Title") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1GroundingAttributionWeb - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1GroundingChunk: Grounding chunk. type GoogleCloudAiplatformV1GroundingChunk struct { // RetrievedContext: Grounding chunk from context retrieved by the retrieval @@ -11407,8 +11401,6 @@ func (s GoogleCloudAiplatformV1GroundingChunkWeb) MarshalJSON() ([]byte, error) // GoogleCloudAiplatformV1GroundingMetadata: Metadata returned to client when // grounding is enabled. type GoogleCloudAiplatformV1GroundingMetadata struct { - // GroundingAttributions: Optional. List of grounding attributions. - GroundingAttributions []*GoogleCloudAiplatformV1GroundingAttribution `json:"groundingAttributions,omitempty"` // GroundingChunks: List of supporting references retrieved from specified // grounding source. GroundingChunks []*GoogleCloudAiplatformV1GroundingChunk `json:"groundingChunks,omitempty"` @@ -11420,15 +11412,15 @@ type GoogleCloudAiplatformV1GroundingMetadata struct { // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroundingAttributions") to + // ForceSendFields is a list of field names (e.g. "GroundingChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GroundingAttributions") 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. "GroundingChunks") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -13449,6 +13441,35 @@ func (s GoogleCloudAiplatformV1ListNasTrialDetailsResponse) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse: Response message +// for [NotebookService.CreateNotebookExecutionJob] +type GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse struct { + // NextPageToken: A token to retrieve next page of results. Pass to + // ListNotebookExecutionJobs.page_token to obtain that page. + NextPageToken string `json:"nextPageToken,omitempty"` + // NotebookExecutionJobs: List of NotebookExecutionJobs in the requested page. + NotebookExecutionJobs []*GoogleCloudAiplatformV1NotebookExecutionJob `json:"notebookExecutionJobs,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 GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse: Response // message for NotebookService.ListNotebookRuntimeTemplates. type GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse struct { @@ -16707,6 +16728,8 @@ type GoogleCloudAiplatformV1NearestNeighborQuery struct { // NeighborCount: Optional. The number of similar entities to be retrieved from // feature view for each query. NeighborCount int64 `json:"neighborCount,omitempty"` + // NumericFilters: Optional. The list of numeric filters. + NumericFilters []*GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter `json:"numericFilters,omitempty"` // Parameters: Optional. Parameters that can be set to tune query on the fly. Parameters *GoogleCloudAiplatformV1NearestNeighborQueryParameters `json:"parameters,omitempty"` // PerCrowdingAttributeNeighborCount: Optional. Crowding is a constraint on a @@ -16774,6 +16797,69 @@ func (s *GoogleCloudAiplatformV1NearestNeighborQueryEmbedding) UnmarshalJSON(dat return nil } +// 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 +type GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter struct { + // Name: Required. Column name in BigQuery that used as filters. + Name string `json:"name,omitempty"` + // Op: Optional. This MUST be specified for queries and must NOT be specified + // for database points. + // + // Possible values: + // "OPERATOR_UNSPECIFIED" - Unspecified operator. + // "LESS" - Entities are eligible if their value is < the query's. + // "LESS_EQUAL" - Entities are eligible if their value is <= the query's. + // "EQUAL" - Entities are eligible if their value is == the query's. + // "GREATER_EQUAL" - Entities are eligible if their value is >= the query's. + // "GREATER" - Entities are eligible if their value is > the query's. + // "NOT_EQUAL" - Entities are eligible if their value is != the query's. + Op string `json:"op,omitempty"` + // ValueDouble: double value type. + ValueDouble float64 `json:"valueDouble,omitempty"` + // ValueFloat: float value type. + ValueFloat float64 `json:"valueFloat,omitempty"` + // ValueInt: int value type. + ValueInt int64 `json:"valueInt,omitempty,string"` + // 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 GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1NearestNeighborQueryNumericFilter + var s1 struct { + ValueDouble gensupport.JSONFloat64 `json:"valueDouble"` + ValueFloat gensupport.JSONFloat64 `json:"valueFloat"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ValueDouble = float64(s1.ValueDouble) + s.ValueFloat = float64(s1.ValueFloat) + return nil +} + // GoogleCloudAiplatformV1NearestNeighborQueryParameters: Parameters that can // be overrided in each query to tune query latency and recall. type GoogleCloudAiplatformV1NearestNeighborQueryParameters struct { @@ -17170,6 +17256,181 @@ func (s GoogleCloudAiplatformV1NotebookEucConfig) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1NotebookExecutionJob: NotebookExecutionJob represents +// an instance of a notebook execution. +type GoogleCloudAiplatformV1NotebookExecutionJob struct { + // CreateTime: Output only. Timestamp when this NotebookExecutionJob was + // created. + CreateTime string `json:"createTime,omitempty"` + // DataformRepositorySource: The Dataform Repository pointing to a single file + // notebook repository. + DataformRepositorySource *GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource `json:"dataformRepositorySource,omitempty"` + // DirectNotebookSource: The contents of an input notebook file. + DirectNotebookSource *GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource `json:"directNotebookSource,omitempty"` + // DisplayName: The display name of the NotebookExecutionJob. The name can be + // up to 128 characters long and can consist of any UTF-8 characters. + DisplayName string `json:"displayName,omitempty"` + // ExecutionTimeout: Max running time of the execution job in seconds (default + // 86400s / 24 hrs). + ExecutionTimeout string `json:"executionTimeout,omitempty"` + // ExecutionUser: The user email to run the execution as. Only supported by + // Colab runtimes. + ExecutionUser string `json:"executionUser,omitempty"` + // GcsNotebookSource: The Cloud Storage url pointing to the ipynb file. Format: + // `gs://bucket/notebook_file.ipynb` + GcsNotebookSource *GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource `json:"gcsNotebookSource,omitempty"` + // GcsOutputUri: The Cloud Storage location to upload the result to. Format: + // `gs://bucket-name` + GcsOutputUri string `json:"gcsOutputUri,omitempty"` + // JobState: Output only. The state of the NotebookExecutionJob. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. + // "JOB_STATE_QUEUED" - The job has been just created or resumed and + // processing has not yet begun. + // "JOB_STATE_PENDING" - The service is preparing to run the job. + // "JOB_STATE_RUNNING" - The job is in progress. + // "JOB_STATE_SUCCEEDED" - The job completed successfully. + // "JOB_STATE_FAILED" - The job failed. + // "JOB_STATE_CANCELLING" - The job is being cancelled. From this state the + // job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + // "JOB_STATE_CANCELLED" - The job has been cancelled. + // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. + // "JOB_STATE_EXPIRED" - The job has expired. + // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the + // `RUNNING` state can be updated. After updating, the job goes back to the + // `RUNNING` state. + // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, some + // results may be missing due to errors. + JobState string `json:"jobState,omitempty"` + // Labels: The labels with user-defined metadata to organize + // NotebookExecutionJobs. Label keys and values can be no longer than 64 + // characters (Unicode codepoints), can only contain lowercase letters, numeric + // characters, underscores and dashes. International characters are allowed. + // See https://goo.gl/xmQnxf for more information and examples of labels. + // System reserved label keys are prefixed with "aiplatform.googleapis.com/" + // and are immutable. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. The resource name of this NotebookExecutionJob. Format: + // `projects/{project_id}/locations/{location}/notebookExecutionJobs/{job_id}` + Name string `json:"name,omitempty"` + // NotebookRuntimeTemplateResourceName: The NotebookRuntimeTemplate to source + // compute configuration from. + NotebookRuntimeTemplateResourceName string `json:"notebookRuntimeTemplateResourceName,omitempty"` + // ScheduleResourceName: Output only. The Schedule resource name if this job is + // triggered by one. Format: + // `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + ScheduleResourceName string `json:"scheduleResourceName,omitempty"` + // ServiceAccount: The service account to run the execution as. + ServiceAccount string `json:"serviceAccount,omitempty"` + // Status: Output only. Populated when the NotebookExecutionJob is completed. + // When there is an error during notebook execution, the error details are + // populated. + Status *GoogleRpcStatus `json:"status,omitempty"` + // UpdateTime: Output only. Timestamp when this NotebookExecutionJob was most + // recently updated. + 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 GoogleCloudAiplatformV1NotebookExecutionJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1NotebookExecutionJob + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource: The +// Dataform Repository containing the input notebook. +type GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource struct { + // CommitSha: The commit SHA to read repository with. If unset, the file will + // be read at HEAD. + CommitSha string `json:"commitSha,omitempty"` + // DataformRepositoryResourceName: The resource name of the Dataform + // Repository. Format: + // `projects/{project_id}/locations/{location}/repositories/{repository_id}` + DataformRepositoryResourceName string `json:"dataformRepositoryResourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CommitSha") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CommitSha") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1NotebookExecutionJobDataformRepositorySource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource: The content +// of the input notebook in ipynb format. +type GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource struct { + // Content: The base64-encoded contents of the input notebook file. + Content string `json:"content,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 GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1NotebookExecutionJobDirectNotebookSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource: The Cloud +// Storage uri for the input notebook. +type GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource struct { + // Generation: The version of the Cloud Storage object to read. If unset, the + // current version of the object is read. See + // https://cloud.google.com/storage/docs/metadata#generation-number. + Generation string `json:"generation,omitempty"` + // Uri: The Cloud Storage uri pointing to the ipynb file. Format: + // `gs://bucket/notebook_file.ipynb` + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Generation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Generation") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1NotebookExecutionJobGcsNotebookSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1NotebookIdleShutdownConfig: The idle shutdown // configuration of NotebookRuntimeTemplate, which contains the idle_timeout as // required field. @@ -17808,6 +18069,9 @@ type GoogleCloudAiplatformV1PersistentResource struct { // (https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field // is left unspecified, the resources aren't peered with any network. Network string `json:"network,omitempty"` + // PscInterfaceConfig: Optional. Configuration for PSC-I for + // PersistentResource. + PscInterfaceConfig *GoogleCloudAiplatformV1PscInterfaceConfig `json:"pscInterfaceConfig,omitempty"` // ReservedIpRanges: Optional. A list of names for the reserved IP ranges under // the VPC network that can be used for this persistent resource. If set, we // will deploy the persistent resource within the provided IP ranges. @@ -18764,6 +19028,37 @@ func (s GoogleCloudAiplatformV1PscAutomatedEndpoints) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PscInterfaceConfig: Configuration for PSC-I. +type GoogleCloudAiplatformV1PscInterfaceConfig struct { + // NetworkAttachment: Optional. The full name of the Compute Engine network + // attachment (https://cloud.google.com/vpc/docs/about-network-attachments) to + // attach to the resource. For example, + // `projects/12345/regions/us-central1/networkAttachments/myNA`. is of the form + // `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. + // Where {project} is a project number, as in `12345`, and {networkAttachment} + // is a network attachment name. To specify this field, you must have already + // [created a network attachment] + // (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). + // This field is only used for resources using PSC-I. + NetworkAttachment string `json:"networkAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "NetworkAttachment") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NetworkAttachment") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1PscInterfaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PscInterfaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PublisherModel: A Model Garden Publisher Model. type GoogleCloudAiplatformV1PublisherModel struct { // Frameworks: Optional. Additional information about the model's Frameworks. @@ -20003,6 +20298,29 @@ func (s GoogleCloudAiplatformV1RawPredictRequest) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1RayLogsSpec: Configuration for the Ray OSS Logs. +type GoogleCloudAiplatformV1RayLogsSpec struct { + // Disabled: Optional. Flag to disable the export of Ray OSS logs to Cloud + // Logging. + Disabled bool `json:"disabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Disabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1RayLogsSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RayLogsSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1RayMetricSpec: Configuration for the Ray metrics. type GoogleCloudAiplatformV1RayMetricSpec struct { // Disabled: Optional. Flag to disable the Ray metrics collection. @@ -20043,6 +20361,8 @@ type GoogleCloudAiplatformV1RaySpec struct { // need all the resource pools to have the same Ray image. Otherwise, use the // {@code resource_pool_images} field. ImageUri string `json:"imageUri,omitempty"` + // RayLogsSpec: Optional. OSS Ray logging configurations. + RayLogsSpec *GoogleCloudAiplatformV1RayLogsSpec `json:"rayLogsSpec,omitempty"` // RayMetricSpec: Optional. Ray metrics configurations. RayMetricSpec *GoogleCloudAiplatformV1RayMetricSpec `json:"rayMetricSpec,omitempty"` // ResourcePoolImages: Optional. Required if image_uri isn't set. A map of @@ -20753,9 +21073,8 @@ func (s GoogleCloudAiplatformV1ResumeScheduleRequest) MarshalJSON() ([]byte, err // GoogleCloudAiplatformV1Retrieval: Defines a retrieval tool that model can // call to access external knowledge. type GoogleCloudAiplatformV1Retrieval struct { - // DisableAttribution: Optional. Disable using the result from this tool in - // detecting grounding attribution. This does not affect how the result is - // given to the model for generation. + // DisableAttribution: Optional. Deprecated. This option is no longer + // supported. DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1VertexAISearch `json:"vertexAiSearch,omitempty"` @@ -21493,6 +21812,14 @@ type GoogleCloudAiplatformV1Scheduling struct { // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. RestartJobOnWorkerRestart bool `json:"restartJobOnWorkerRestart,omitempty"` + // Strategy: Optional. This determines which type of scheduling strategy to + // use. + // + // Possible values: + // "STRATEGY_UNSPECIFIED" - Strategy will default to ON_DEMAND. + // "ON_DEMAND" - Regular on-demand provisioning strategy. + // "LOW_COST" - Low cost by making potential use of spot resources. + Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableRetries") to @@ -29896,6 +30223,7 @@ type GoogleCloudAiplatformV1SupervisedHyperParameters struct { // "ADAPTER_SIZE_FOUR" - Adapter size 4. // "ADAPTER_SIZE_EIGHT" - Adapter size 8. // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. + // "ADAPTER_SIZE_THIRTY_TWO" - Adapter size 32. AdapterSize string `json:"adapterSize,omitempty"` // EpochCount: Optional. Number of complete passes the model makes over the // entire training dataset during training. @@ -33413,101 +33741,6 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type IntelligenceCloudAutomlXpsMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, set the - // legacy billing metric id here. This will be sent to Chemist as the - // "cloudbilling.googleapis.com/argentum_metric_id" label. Otherwise leave - // empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*IntelligenceCloudAutomlXpsMetricEntryLabel `json:"systemLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArgentumMetricId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsMetricEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *IntelligenceCloudAutomlXpsMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod IntelligenceCloudAutomlXpsMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type IntelligenceCloudAutomlXpsMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsMetricEntryLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IntelligenceCloudAutomlXpsReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, this is - // used for quota management and billing. Deprecated. AutoML BE doesn't use - // this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - // MetricEntries: One entry per metric name. The values must be aggregated per - // metric name. - MetricEntries []*IntelligenceCloudAutomlXpsMetricEntry `json:"metricEntries,omitempty"` - // ForceSendFields is a list of field names (e.g. "EffectiveTrainingDuration") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EffectiveTrainingDuration") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsReportingMetrics - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type ProjectsLocationsEvaluateInstancesCall struct { s *Service location string @@ -37505,7 +37738,7 @@ type ProjectsLocationsDatasetsPatchCall struct { // Patch: Updates a Dataset. // -// - name: Output only. The resource name of the Dataset. +// - name: Output only. Identifier. The resource name of the Dataset. func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsPatchCall { c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -40519,7 +40752,7 @@ type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { // Patch: Updates a DatasetVersion. // -// - name: Output only. The resource name of the DatasetVersion. +// - name: Output only. Identifier. The resource name of the DatasetVersion. func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -73544,6 +73777,525 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Cont } } +type ProjectsLocationsNotebookExecutionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a NotebookExecutionJob. +// +// - parent: The resource name of the Location to create the +// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) Create(parent string, googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c := &ProjectsLocationsNotebookExecutionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1notebookexecutionjob = googlecloudaiplatformv1notebookexecutionjob + return c +} + +// NotebookExecutionJobId sets the optional parameter "notebookExecutionJobId": +// User specified ID for the NotebookExecutionJob. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) NotebookExecutionJobId(notebookExecutionJobId string) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c.urlParams_.Set("notebookExecutionJobId", notebookExecutionJobId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) 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.googlecloudaiplatformv1notebookexecutionjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") + 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.notebookExecutionJobs.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 *ProjectsLocationsNotebookExecutionJobsCreateCall) 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 ProjectsLocationsNotebookExecutionJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a NotebookExecutionJob. +// +// - name: The name of the NotebookExecutionJob resource to be deleted. +func (r *ProjectsLocationsNotebookExecutionJobsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsDeleteCall { + c := &ProjectsLocationsNotebookExecutionJobsDeleteCall{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 *ProjectsLocationsNotebookExecutionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) 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.notebookExecutionJobs.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 *ProjectsLocationsNotebookExecutionJobsDeleteCall) 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 ProjectsLocationsNotebookExecutionJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a NotebookExecutionJob. +// +// - name: The name of the NotebookExecutionJob resource. +func (r *ProjectsLocationsNotebookExecutionJobsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c := &ProjectsLocationsNotebookExecutionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) View(view string) *ProjectsLocationsNotebookExecutionJobsGetCall { + 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 *ProjectsLocationsNotebookExecutionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGetCall { + 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 *ProjectsLocationsNotebookExecutionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) 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.notebookExecutionJobs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1NotebookExecutionJob.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookExecutionJob, 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 := &GoogleCloudAiplatformV1NotebookExecutionJob{ + 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 ProjectsLocationsNotebookExecutionJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists NotebookExecutionJobs in a Location. +// +// - parent: The resource name of the Location from which to list the +// NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) List(parent string) *ProjectsLocationsNotebookExecutionJobsListCall { + c := &ProjectsLocationsNotebookExecutionJobsListCall{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 request. For field names both snake_case and camelCase are +// supported. * `notebookExecutionJob` supports = and !=. +// `notebookExecutionJob` represents the NotebookExecutionJob ID. * +// `displayName` supports = and != and regex. * `schedule` supports = and != +// and regex. Some examples: * `notebookExecutionJob="123" * +// `notebookExecutionJob="my-execution-job" * `displayName="myDisplayName" +// and `displayName=~"myDisplayNameRegex" +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsListCall { + 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` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListNotebookExecutionJobs.next_page_token of +// the previous NotebookService.ListNotebookExecutionJobs call. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) View(view string) *ProjectsLocationsNotebookExecutionJobsListCall { + 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 *ProjectsLocationsNotebookExecutionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsListCall { + 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 *ProjectsLocationsNotebookExecutionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsNotebookExecutionJobsListCall) 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}/notebookExecutionJobs") + 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.projects.locations.notebookExecutionJobs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse.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 *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse, 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 := &GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse{ + 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 *ProjectsLocationsNotebookExecutionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) 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 ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { s *Service name string @@ -94246,9 +94998,16 @@ func (r *PublishersModelsService) Get(name string) *PublishersModelsGetCall { 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 { + c.urlParams_.Set("isHuggingFaceModel", fmt.Sprint(isHuggingFaceModel)) + return c +} + // LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 // language code representing the language in which the publisher model's text -// information should be written in (see go/bcp47). +// information should be written in. func (c *PublishersModelsGetCall) LanguageCode(languageCode string) *PublishersModelsGetCall { c.urlParams_.Set("languageCode", languageCode) return c diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 83da3ab8a1e..592632b70e3 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -1980,7 +1980,7 @@ ], "parameters": { "name": { - "description": "Output only. The resource name of the Dataset.", + "description": "Output only. Identifier. The resource name of the Dataset.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -2857,7 +2857,7 @@ ], "parameters": { "name": { - "description": "Output only. The resource name of the DatasetVersion.", + "description": "Output only. Identifier. The resource name of the DatasetVersion.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/datasetVersions/[^/]+$", "required": true, @@ -20336,8 +20336,13 @@ "name" ], "parameters": { + "isHuggingFaceModel": { + "description": "Optional. Boolean indicates whether the requested model is a Hugging Face model.", + "location": "query", + "type": "boolean" + }, "languageCode": { - "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher model's text information should be written in (see go/bcp47).", + "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher model's text information should be written in.", "location": "query", "type": "string" }, @@ -20389,7 +20394,7 @@ "type": "string" }, "languageCode": { - "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher models' text information should be written in (see go/bcp47). If not set, by default English (en).", + "description": "Optional. The IETF BCP-47 language code representing the language in which the publisher models' text information should be written in. If not set, by default English (en).", "location": "query", "type": "string" }, @@ -20447,11 +20452,11 @@ } } }, - "revision": "20240703", + "revision": "20240715", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { - "description": "Next ID: 8 Generate video response.", + "description": "Generate video response.", "id": "CloudAiLargeModelsVisionGenerateVideoResponse", "properties": { "generatedSamples": { @@ -20472,10 +20477,6 @@ "type": "string" }, "type": "array" - }, - "reportingMetrics": { - "$ref": "IntelligenceCloudAutomlXpsReportingMetrics", - "description": "Billable prediction metrics." } }, "type": "object" @@ -21002,6 +21003,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig": { + "description": "The API secret.", + "id": "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig", + "properties": { + "apiKeySecretVersion": { + "description": "Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version}", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Artifact": { "description": "Instance of a general artifact.", "id": "GoogleCloudAiplatformV1beta1Artifact", @@ -22339,6 +22351,12 @@ }, "readOnly": true, "type": "array" + }, + "score": { + "description": "Output only. Confidence score of the candidate.", + "format": "double", + "readOnly": true, + "type": "number" } }, "type": "object" @@ -22550,21 +22568,21 @@ "id": "GoogleCloudAiplatformV1beta1ComputeTokensRequest", "properties": { "contents": { - "description": "Required. Input content.", + "description": "Optional. Input content.", "items": { "$ref": "GoogleCloudAiplatformV1beta1Content" }, "type": "array" }, "instances": { - "description": "Required. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", + "description": "Optional. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models.", "items": { "type": "any" }, "type": "array" }, "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", + "description": "Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*", "type": "string" } }, @@ -22766,22 +22784,33 @@ "id": "GoogleCloudAiplatformV1beta1CountTokensRequest", "properties": { "contents": { - "description": "Required. Input content.", + "description": "Optional. Input content.", "items": { "$ref": "GoogleCloudAiplatformV1beta1Content" }, "type": "array" }, "instances": { - "description": "Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", + "description": "Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.", "items": { "type": "any" }, "type": "array" }, "model": { - "description": "Required. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", + "description": "Optional. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`", "type": "string" + }, + "systemInstruction": { + "$ref": "GoogleCloudAiplatformV1beta1Content", + "description": "Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph." + }, + "tools": { + "description": "Optional. A list of `Tools` the model may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1Tool" + }, + "type": "array" } }, "type": "object" @@ -23629,7 +23658,7 @@ "type": "string" }, "name": { - "description": "Output only. The resource name of the Dataset.", + "description": "Output only. Identifier. The resource name of the Dataset.", "readOnly": true, "type": "string" }, @@ -23683,7 +23712,7 @@ "type": "string" }, "name": { - "description": "Output only. The resource name of the DatasetVersion.", + "description": "Output only. Identifier. The resource name of the DatasetVersion.", "readOnly": true, "type": "string" }, @@ -24311,6 +24340,15 @@ "readOnly": true, "type": "string" }, + "dedicatedEndpointDns": { + "description": "Output only. DNS of the dedicated endpoint. Will only be populated if dedicated_endpoint_enabled is true. Format: `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`.", + "readOnly": true, + "type": "string" + }, + "dedicatedEndpointEnabled": { + "description": "If true, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitation will be removed soon.", + "type": "boolean" + }, "deployedModels": { "description": "Output only. The models deployed in this Endpoint. To add or remove DeployedModels use EndpointService.DeployModel and EndpointService.UndeployModel respectively.", "items": { @@ -27920,66 +27958,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1GroundingAttribution": { - "description": "Grounding attribution.", - "id": "GoogleCloudAiplatformV1beta1GroundingAttribution", - "properties": { - "confidenceScore": { - "description": "Optional. Output only. Confidence score of the attribution. Ranges from 0 to 1. 1 is the most confident.", - "format": "float", - "readOnly": true, - "type": "number" - }, - "retrievedContext": { - "$ref": "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext", - "description": "Optional. Attribution from context retrieved by the retrieval tools." - }, - "segment": { - "$ref": "GoogleCloudAiplatformV1beta1Segment", - "description": "Output only. Segment of the content this attribution belongs to.", - "readOnly": true - }, - "web": { - "$ref": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", - "description": "Optional. Attribution from the web." - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext": { - "description": "Attribution from context retrieved by the retrieval tools.", - "id": "GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext", - "properties": { - "title": { - "description": "Output only. Title of the attribution.", - "readOnly": true, - "type": "string" - }, - "uri": { - "description": "Output only. URI reference of the attribution.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudAiplatformV1beta1GroundingAttributionWeb": { - "description": "Attribution from the web.", - "id": "GoogleCloudAiplatformV1beta1GroundingAttributionWeb", - "properties": { - "title": { - "description": "Output only. Title of the attribution.", - "readOnly": true, - "type": "string" - }, - "uri": { - "description": "Output only. URI reference of the attribution.", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1GroundingChunk": { "description": "Grounding chunk.", "id": "GoogleCloudAiplatformV1beta1GroundingChunk", @@ -28029,13 +28007,6 @@ "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1beta1GroundingMetadata", "properties": { - "groundingAttributions": { - "description": "Optional. List of grounding attributions.", - "items": { - "$ref": "GoogleCloudAiplatformV1beta1GroundingAttribution" - }, - "type": "array" - }, "groundingChunks": { "description": "List of supporting references retrieved from specified grounding source.", "items": { @@ -28463,6 +28434,10 @@ "$ref": "GoogleCloudAiplatformV1beta1GoogleDriveSource", "description": "Google Drive location. Supports importing individual files as well as Google Drive folders." }, + "jiraSource": { + "$ref": "GoogleCloudAiplatformV1beta1JiraSource", + "description": "Jira queries with their corresponding authentication." + }, "maxEmbeddingRequestsPerMin": { "description": "Optional. The max number of queries per minute that this job is allowed to make to the embedding model specified on the corpus. This value is specific to this job and not shared across other import jobs. Consult the Quotas page on the project to set an appropriate value here. If unspecified, a default value of 1,000 QPM would be used.", "format": "int32", @@ -28471,6 +28446,10 @@ "ragFileChunkingConfig": { "$ref": "GoogleCloudAiplatformV1beta1RagFileChunkingConfig", "description": "Specifies the size and overlap of chunks after importing RagFiles." + }, + "slackSource": { + "$ref": "GoogleCloudAiplatformV1beta1SlackSource", + "description": "Slack channels with their corresponding access tokens." } }, "type": "object" @@ -28984,6 +28963,53 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1JiraSource": { + "description": "The Jira source for the ImportRagFilesRequest.", + "id": "GoogleCloudAiplatformV1beta1JiraSource", + "properties": { + "jiraQueries": { + "description": "Required. The Jira queries.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1JiraSourceJiraQueries" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1JiraSourceJiraQueries": { + "description": "JiraQueries contains the Jira queries and corresponding authentication.", + "id": "GoogleCloudAiplatformV1beta1JiraSourceJiraQueries", + "properties": { + "apiKeyConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig", + "description": "Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Jira API key (https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/)." + }, + "customQueries": { + "description": "A list of custom Jira queries to import. For information about JQL (Jira Query Language), see https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/", + "items": { + "type": "string" + }, + "type": "array" + }, + "email": { + "description": "Required. The Jira email address.", + "type": "string" + }, + "projects": { + "description": "A list of Jira projects to import in their entirety.", + "items": { + "type": "string" + }, + "type": "array" + }, + "serverUri": { + "description": "Required. The Jira server URI.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1LargeModelReference": { "description": "Contains information about the Large Model.", "id": "GoogleCloudAiplatformV1beta1LargeModelReference", @@ -31373,6 +31399,16 @@ "$ref": "GoogleCloudAiplatformV1beta1ModelMonitoringOutputSpec", "description": "Optional default monitoring metrics/logs export spec, it can be overridden in the ModelMonitoringJob output spec. If not specified, a default Google Cloud Storage bucket will be created under your project." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "tabularObjective": { "$ref": "GoogleCloudAiplatformV1beta1ModelMonitoringObjectiveSpecTabularObjective", "description": "Optional default tabular model monitoring objective." @@ -32838,6 +32874,13 @@ "format": "int32", "type": "integer" }, + "numericFilters": { + "description": "Optional. The list of numeric filters.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter" + }, + "type": "array" + }, "parameters": { "$ref": "GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters", "description": "Optional. Parameters that can be set to tune query on the fly." @@ -32872,6 +32915,54 @@ }, "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", + "id": "GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter", + "properties": { + "name": { + "description": "Required. Column name in BigQuery that used as filters.", + "type": "string" + }, + "op": { + "description": "Optional. This MUST be specified for queries and must NOT be specified for database points.", + "enum": [ + "OPERATOR_UNSPECIFIED", + "LESS", + "LESS_EQUAL", + "EQUAL", + "GREATER_EQUAL", + "GREATER", + "NOT_EQUAL" + ], + "enumDescriptions": [ + "Unspecified operator.", + "Entities are eligible if their value is \u003c the query's.", + "Entities are eligible if their value is \u003c= the query's.", + "Entities are eligible if their value is == the query's.", + "Entities are eligible if their value is \u003e= the query's.", + "Entities are eligible if their value is \u003e the query's.", + "Entities are eligible if their value is != the query's." + ], + "type": "string" + }, + "valueDouble": { + "description": "double value type.", + "format": "double", + "type": "number" + }, + "valueFloat": { + "description": "float value type.", + "format": "float", + "type": "number" + }, + "valueInt": { + "description": "int value type.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters": { "description": "Parameters that can be overrided in each query to tune query latency and recall.", "id": "GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters", @@ -33861,6 +33952,10 @@ "description": "Optional. The full name of the Compute Engine [network](/compute/docs/networks-and-firewalls#networks) to peered with Vertex AI to host the persistent resources. For example, `projects/12345/global/networks/myVPC`. [Format](/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in `12345`, and {network} is a network name. To specify this field, you must have already [configured VPC Network Peering for Vertex AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field is left unspecified, the resources aren't peered with any network.", "type": "string" }, + "pscInterfaceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PscInterfaceConfig", + "description": "Optional. Configuration for PSC-I for PersistentResource." + }, "reservedIpRanges": { "description": "Optional. A list of names for the reserved IP ranges under the VPC network that can be used for this persistent resource. If set, we will deploy the persistent resource within the provided IP ranges. Otherwise, the persistent resource is deployed to any IP ranges under the provided VPC network. Example: ['vertex-ai-ip-range'].", "items": { @@ -33995,6 +34090,16 @@ "$ref": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig", "description": "Runtime config of the pipeline." }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, + "satisfiesPzs": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "scheduleName": { "description": "Output only. The schedule resource name. Only returned if the Pipeline is created by Schedule API.", "readOnly": true, @@ -34643,6 +34748,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PscInterfaceConfig": { + "description": "Configuration for PSC-I.", + "id": "GoogleCloudAiplatformV1beta1PscInterfaceConfig", + "properties": { + "networkAttachment": { + "description": "Optional. The full name of the Compute Engine [network attachment](https://cloud.google.com/vpc/docs/about-network-attachments) to attach to the resource. For example, `projects/12345/regions/us-central1/networkAttachments/myNA`. is of the form `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. Where {project} is a project number, as in `12345`, and {networkAttachment} is a network attachment name. To specify this field, you must have already [created a network attachment] (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). This field is only used for resources using PSC-I.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PublisherModel": { "description": "A Model Garden Publisher Model.", "id": "GoogleCloudAiplatformV1beta1PublisherModel", @@ -35717,6 +35833,10 @@ "description": "Output only. Google Drive location. Supports importing individual files as well as Google Drive folders.", "readOnly": true }, + "jiraSource": { + "$ref": "GoogleCloudAiplatformV1beta1JiraSource", + "description": "The RagFile is imported from a Jira query." + }, "name": { "description": "Output only. The resource name of the RagFile.", "readOnly": true, @@ -35743,6 +35863,10 @@ "readOnly": true, "type": "string" }, + "slackSource": { + "$ref": "GoogleCloudAiplatformV1beta1SlackSource", + "description": "The RagFile is imported from a Slack channel." + }, "updateTime": { "description": "Output only. Timestamp when this RagFile was last updated.", "format": "google-datetime", @@ -35796,6 +35920,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1RayLogsSpec": { + "description": "Configuration for the Ray OSS Logs.", + "id": "GoogleCloudAiplatformV1beta1RayLogsSpec", + "properties": { + "disabled": { + "description": "Optional. Flag to disable the export of Ray OSS logs to Cloud Logging.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RayMetricSpec": { "description": "Configuration for the Ray metrics.", "id": "GoogleCloudAiplatformV1beta1RayMetricSpec", @@ -35819,6 +35954,10 @@ "description": "Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.", "type": "string" }, + "rayLogsSpec": { + "$ref": "GoogleCloudAiplatformV1beta1RayLogsSpec", + "description": "Optional. OSS Ray logging configurations." + }, "rayMetricSpec": { "$ref": "GoogleCloudAiplatformV1beta1RayMetricSpec", "description": "Optional. Ray metrics configurations." @@ -36411,7 +36550,8 @@ "id": "GoogleCloudAiplatformV1beta1Retrieval", "properties": { "disableAttribution": { - "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "deprecated": true, + "description": "Optional. Deprecated. This option is no longer supported.", "type": "boolean" }, "vertexAiSearch": { @@ -37105,6 +37245,20 @@ "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" }, + "strategy": { + "description": "Optional. This determines which type of scheduling strategy to use.", + "enum": [ + "STRATEGY_UNSPECIFIED", + "ON_DEMAND", + "LOW_COST" + ], + "enumDescriptions": [ + "Strategy will default to ON_DEMAND.", + "Regular on-demand provisioning strategy.", + "Low cost by making potential use of spot resources." + ], + "type": "string" + }, "timeout": { "description": "The maximum job running time. The default is 7 days.", "format": "google-duration", @@ -41271,6 +41425,59 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SlackSource": { + "description": "The Slack source for the ImportRagFilesRequest.", + "id": "GoogleCloudAiplatformV1beta1SlackSource", + "properties": { + "channels": { + "description": "Required. The Slack channels.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SlackSourceSlackChannels" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SlackSourceSlackChannels": { + "description": "SlackChannels contains the Slack channels and corresponding access token.", + "id": "GoogleCloudAiplatformV1beta1SlackSourceSlackChannels", + "properties": { + "apiKeyConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig", + "description": "Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Slack channel access token that has access to the slack channel IDs. See: https://api.slack.com/tutorials/tracks/getting-a-token." + }, + "channels": { + "description": "Required. The Slack channel IDs.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel": { + "description": "SlackChannel contains the Slack channel ID and the time range to import.", + "id": "GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel", + "properties": { + "channelId": { + "description": "Required. The Slack channel ID.", + "type": "string" + }, + "endTime": { + "description": "Optional. The ending timestamp for messages to import.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Optional. The starting timestamp for messages to import.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1SmoothGradConfig": { "description": "Config for SmoothGrad approximation of gradients. When enabled, the gradients are approximated by averaging the gradients from noisy samples in the vicinity of the inputs. Adding noise can help improve the computed gradients. Refer to this paper for more details: https://arxiv.org/pdf/1706.03825.pdf", "id": "GoogleCloudAiplatformV1beta1SmoothGradConfig", @@ -42412,14 +42619,16 @@ "ADAPTER_SIZE_ONE", "ADAPTER_SIZE_FOUR", "ADAPTER_SIZE_EIGHT", - "ADAPTER_SIZE_SIXTEEN" + "ADAPTER_SIZE_SIXTEEN", + "ADAPTER_SIZE_THIRTY_TWO" ], "enumDescriptions": [ "Adapter size is unspecified.", "Adapter size 1.", "Adapter size 4.", "Adapter size 8.", - "Adapter size 16." + "Adapter size 16.", + "Adapter size 32." ], "type": "string" }, @@ -44974,70 +45183,6 @@ } }, "type": "object" - }, - "IntelligenceCloudAutomlXpsMetricEntry": { - "id": "IntelligenceCloudAutomlXpsMetricEntry", - "properties": { - "argentumMetricId": { - "description": "For billing metrics that are using legacy sku's, set the legacy billing metric id here. This will be sent to Chemist as the \"cloudbilling.googleapis.com/argentum_metric_id\" label. Otherwise leave empty.", - "type": "string" - }, - "doubleValue": { - "description": "A double value.", - "format": "double", - "type": "number" - }, - "int64Value": { - "description": "A signed 64-bit integer value.", - "format": "int64", - "type": "string" - }, - "metricName": { - "description": "The metric name defined in the service configuration.", - "type": "string" - }, - "systemLabels": { - "description": "Billing system labels for this (metric, value) pair.", - "items": { - "$ref": "IntelligenceCloudAutomlXpsMetricEntryLabel" - }, - "type": "array" - } - }, - "type": "object" - }, - "IntelligenceCloudAutomlXpsMetricEntryLabel": { - "id": "IntelligenceCloudAutomlXpsMetricEntryLabel", - "properties": { - "labelName": { - "description": "The name of the label.", - "type": "string" - }, - "labelValue": { - "description": "The value of the label.", - "type": "string" - } - }, - "type": "object" - }, - "IntelligenceCloudAutomlXpsReportingMetrics": { - "id": "IntelligenceCloudAutomlXpsReportingMetrics", - "properties": { - "effectiveTrainingDuration": { - "deprecated": true, - "description": "The effective time training used. If set, this is used for quota management and billing. Deprecated. AutoML BE doesn't use this. Don't set.", - "format": "google-duration", - "type": "string" - }, - "metricEntries": { - "description": "One entry per metric name. The values must be aggregated per metric name.", - "items": { - "$ref": "IntelligenceCloudAutomlXpsMetricEntry" - }, - "type": "array" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 67ab8d8a1ec..f05797de7bf 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -1661,8 +1661,7 @@ type PublishersModelsService struct { s *Service } -// CloudAiLargeModelsVisionGenerateVideoResponse: Next ID: 8 Generate video -// response. +// CloudAiLargeModelsVisionGenerateVideoResponse: Generate video response. type CloudAiLargeModelsVisionGenerateVideoResponse struct { // GeneratedSamples: The generates samples. GeneratedSamples []*CloudAiLargeModelsVisionMedia `json:"generatedSamples,omitempty"` @@ -1671,8 +1670,6 @@ type CloudAiLargeModelsVisionGenerateVideoResponse struct { RaiMediaFilteredCount int64 `json:"raiMediaFilteredCount,omitempty"` // RaiMediaFilteredReasons: Returns rai failure reasons if any. RaiMediaFilteredReasons []string `json:"raiMediaFilteredReasons,omitempty"` - // ReportingMetrics: Billable prediction metrics. - ReportingMetrics *IntelligenceCloudAutomlXpsReportingMetrics `json:"reportingMetrics,omitempty"` // ForceSendFields is a list of field names (e.g. "GeneratedSamples") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2387,6 +2384,30 @@ func (s GoogleCloudAiplatformV1beta1AnnotationSpec) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig: The API secret. +type GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig struct { + // ApiKeySecretVersion: Required. The SecretManager secret version resource + // name storing API key. e.g. + // projects/{project}/secrets/{secret}/versions/{version} + ApiKeySecretVersion string `json:"apiKeySecretVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeySecretVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiKeySecretVersion") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Artifact: Instance of a general artifact. type GoogleCloudAiplatformV1beta1Artifact struct { // CreateTime: Output only. Timestamp when this Artifact was created. @@ -4391,6 +4412,8 @@ 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"` + // Score: Output only. Confidence score of the candidate. + Score float64 `json:"score,omitempty"` // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4409,6 +4432,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 { + 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 +} + // GoogleCloudAiplatformV1beta1CheckTrialEarlyStoppingStateMetatdata: This // message will be placed in the metadata field of a // google.longrunning.Operation associated with a CheckTrialEarlyStoppingState @@ -4704,13 +4741,13 @@ func (s GoogleCloudAiplatformV1beta1CompletionStats) MarshalJSON() ([]byte, erro // GoogleCloudAiplatformV1beta1ComputeTokensRequest: Request message for // ComputeTokens RPC call. type GoogleCloudAiplatformV1beta1ComputeTokensRequest struct { - // Contents: Required. Input content. + // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` - // Instances: Required. The instances that are the input to token computing API + // Instances: Optional. The instances that are the input to token computing API // call. Schema is identical to the prediction schema of the text model, even // for the non-text models, like chat models, or Codey models. Instances []interface{} `json:"instances,omitempty"` - // Model: Required. The name of the publisher model requested to serve the + // Model: Optional. The name of the publisher model requested to serve the // prediction. Format: // projects/{project}/locations/{location}/publishers/*/models/* Model string `json:"model,omitempty"` @@ -4999,15 +5036,24 @@ func (s GoogleCloudAiplatformV1beta1CopyModelResponse) MarshalJSON() ([]byte, er // GoogleCloudAiplatformV1beta1CountTokensRequest: Request message for // PredictionService.CountTokens. type GoogleCloudAiplatformV1beta1CountTokensRequest struct { - // Contents: Required. Input content. + // Contents: Optional. Input content. Contents []*GoogleCloudAiplatformV1beta1Content `json:"contents,omitempty"` - // Instances: Required. The instances that are the input to token counting + // Instances: Optional. The instances that are the input to token counting // call. Schema is identical to the prediction schema of the underlying model. Instances []interface{} `json:"instances,omitempty"` - // Model: Required. The name of the publisher model requested to serve the + // Model: Optional. The name of the publisher model requested to serve the // prediction. Format: // `projects/{project}/locations/{location}/publishers/*/models/*` Model string `json:"model,omitempty"` + // SystemInstruction: Optional. The user provided system instructions for the + // model. Note: only text should be used in parts and content in each part will + // be in a separate paragraph. + SystemInstruction *GoogleCloudAiplatformV1beta1Content `json:"systemInstruction,omitempty"` + // Tools: Optional. A list of `Tools` the model may use to generate the next + // response. A `Tool` is a piece of code that enables the system to interact + // with external systems to perform an action, or set of actions, outside of + // knowledge and scope of the model. + Tools []*GoogleCloudAiplatformV1beta1Tool `json:"tools,omitempty"` // ForceSendFields is a list of field names (e.g. "Contents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -6275,7 +6321,7 @@ type GoogleCloudAiplatformV1beta1Dataset struct { // ModelReference: Optional. Reference to the public base model last used by // the dataset. Only set for prompt datasets. ModelReference string `json:"modelReference,omitempty"` - // Name: Output only. The resource name of the Dataset. + // Name: Output only. Identifier. The resource name of the Dataset. Name string `json:"name,omitempty"` // SavedQueries: All SavedQueries belong to the Dataset will be returned in // List/Get Dataset response. The annotation_specs field will not be populated @@ -6325,7 +6371,7 @@ type GoogleCloudAiplatformV1beta1DatasetVersion struct { // ModelReference: Output only. Reference to the public base model last used by // the dataset version. Only set for prompt dataset versions. ModelReference string `json:"modelReference,omitempty"` - // Name: Output only. The resource name of the DatasetVersion. + // Name: Output only. Identifier. The resource name of the DatasetVersion. Name string `json:"name,omitempty"` // UpdateTime: Output only. Timestamp when this DatasetVersion was last // updated. @@ -7411,6 +7457,17 @@ func (s GoogleCloudAiplatformV1beta1EncryptionSpec) MarshalJSON() ([]byte, error type GoogleCloudAiplatformV1beta1Endpoint struct { // CreateTime: Output only. Timestamp when this Endpoint was created. CreateTime string `json:"createTime,omitempty"` + // DedicatedEndpointDns: Output only. DNS of the dedicated endpoint. Will only + // be populated if dedicated_endpoint_enabled is true. Format: + // `https://{endpoint_id}.{region}-{project_number}.prediction.vertexai.goog`. + DedicatedEndpointDns string `json:"dedicatedEndpointDns,omitempty"` + // DedicatedEndpointEnabled: If true, the endpoint will be exposed through a + // dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the + // dedicated DNS will be isolated from other users' traffic and will have + // better performance and reliability. Note: Once you enabled dedicated + // endpoint, you won't be able to send request to the shared DNS + // {region}-aiplatform.googleapis.com. The limitation will be removed soon. + DedicatedEndpointEnabled bool `json:"dedicatedEndpointEnabled,omitempty"` // DeployedModels: Output only. The models deployed in this Endpoint. To add or // remove DeployedModels use EndpointService.DeployModel and // EndpointService.UndeployModel respectively. @@ -12629,100 +12686,6 @@ func (s GoogleCloudAiplatformV1beta1GroundednessSpec) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1GroundingAttribution: Grounding attribution. -type GoogleCloudAiplatformV1beta1GroundingAttribution struct { - // ConfidenceScore: Optional. Output only. Confidence score of the attribution. - // Ranges from 0 to 1. 1 is the most confident. - ConfidenceScore float64 `json:"confidenceScore,omitempty"` - // RetrievedContext: Optional. Attribution from context retrieved by the - // retrieval tools. - RetrievedContext *GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext `json:"retrievedContext,omitempty"` - // Segment: Output only. Segment of the content this attribution belongs to. - Segment *GoogleCloudAiplatformV1beta1Segment `json:"segment,omitempty"` - // Web: Optional. Attribution from the web. - Web *GoogleCloudAiplatformV1beta1GroundingAttributionWeb `json:"web,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConfidenceScore") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1beta1GroundingAttribution) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudAiplatformV1beta1GroundingAttribution) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1beta1GroundingAttribution - var s1 struct { - ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ConfidenceScore = float64(s1.ConfidenceScore) - return nil -} - -// GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext: -// Attribution from context retrieved by the retrieval tools. -type GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext struct { - // Title: Output only. Title of the attribution. - Title string `json:"title,omitempty"` - // Uri: Output only. URI reference of the attribution. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Title") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GroundingAttributionRetrievedContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudAiplatformV1beta1GroundingAttributionWeb: Attribution from the -// web. -type GoogleCloudAiplatformV1beta1GroundingAttributionWeb struct { - // Title: Output only. Title of the attribution. - Title string `json:"title,omitempty"` - // Uri: Output only. URI reference of the attribution. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Title") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudAiplatformV1beta1GroundingAttributionWeb) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1GroundingAttributionWeb - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1GroundingChunk: Grounding chunk. type GoogleCloudAiplatformV1beta1GroundingChunk struct { // RetrievedContext: Grounding chunk from context retrieved by the retrieval @@ -12800,8 +12763,6 @@ func (s GoogleCloudAiplatformV1beta1GroundingChunkWeb) MarshalJSON() ([]byte, er // GoogleCloudAiplatformV1beta1GroundingMetadata: Metadata returned to client // when grounding is enabled. type GoogleCloudAiplatformV1beta1GroundingMetadata struct { - // GroundingAttributions: Optional. List of grounding attributions. - GroundingAttributions []*GoogleCloudAiplatformV1beta1GroundingAttribution `json:"groundingAttributions,omitempty"` // GroundingChunks: List of supporting references retrieved from specified // grounding source. GroundingChunks []*GoogleCloudAiplatformV1beta1GroundingChunk `json:"groundingChunks,omitempty"` @@ -12815,15 +12776,15 @@ type GoogleCloudAiplatformV1beta1GroundingMetadata struct { // WebSearchQueries: Optional. Web search queries for the following-up web // search. WebSearchQueries []string `json:"webSearchQueries,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroundingAttributions") to + // ForceSendFields is a list of field names (e.g. "GroundingChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GroundingAttributions") 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. "GroundingChunks") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -13311,6 +13272,8 @@ type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { // GoogleDriveSource: Google Drive location. Supports importing individual // files as well as Google Drive folders. GoogleDriveSource *GoogleCloudAiplatformV1beta1GoogleDriveSource `json:"googleDriveSource,omitempty"` + // JiraSource: Jira queries with their corresponding authentication. + JiraSource *GoogleCloudAiplatformV1beta1JiraSource `json:"jiraSource,omitempty"` // MaxEmbeddingRequestsPerMin: Optional. The max number of queries per minute // that this job is allowed to make to the embedding model specified on the // corpus. This value is specific to this job and not shared across other @@ -13320,6 +13283,8 @@ type GoogleCloudAiplatformV1beta1ImportRagFilesConfig struct { // RagFileChunkingConfig: Specifies the size and overlap of chunks after // importing RagFiles. RagFileChunkingConfig *GoogleCloudAiplatformV1beta1RagFileChunkingConfig `json:"ragFileChunkingConfig,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 // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -14007,6 +13972,65 @@ func (s GoogleCloudAiplatformV1beta1InternalOsServiceStateInstance) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1JiraSource: The Jira source for the +// ImportRagFilesRequest. +type GoogleCloudAiplatformV1beta1JiraSource struct { + // JiraQueries: Required. The Jira queries. + JiraQueries []*GoogleCloudAiplatformV1beta1JiraSourceJiraQueries `json:"jiraQueries,omitempty"` + // ForceSendFields is a list of field names (e.g. "JiraQueries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "JiraQueries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1JiraSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1JiraSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1JiraSourceJiraQueries: JiraQueries contains the +// Jira queries and corresponding authentication. +type GoogleCloudAiplatformV1beta1JiraSourceJiraQueries struct { + // ApiKeyConfig: Required. The SecretManager secret version resource name (e.g. + // projects/{project}/secrets/{secret}/versions/{version}) storing the Jira API + // key + // (https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/). + ApiKeyConfig *GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig `json:"apiKeyConfig,omitempty"` + // CustomQueries: A list of custom Jira queries to import. For information + // about JQL (Jira Query Language), see + // https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + CustomQueries []string `json:"customQueries,omitempty"` + // Email: Required. The Jira email address. + Email string `json:"email,omitempty"` + // Projects: A list of Jira projects to import in their entirety. + Projects []string `json:"projects,omitempty"` + // ServerUri: Required. The Jira server URI. + ServerUri string `json:"serverUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeyConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiKeyConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1JiraSourceJiraQueries) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1JiraSourceJiraQueries + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1LargeModelReference: Contains information about // the Large Model. type GoogleCloudAiplatformV1beta1LargeModelReference struct { @@ -17603,6 +17627,10 @@ type GoogleCloudAiplatformV1beta1ModelMonitor struct { // overridden in the ModelMonitoringJob output spec. If not specified, a // default Google Cloud Storage bucket will be created under your project. OutputSpec *GoogleCloudAiplatformV1beta1ModelMonitoringOutputSpec `json:"outputSpec,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"` // TabularObjective: Optional default tabular model monitoring objective. TabularObjective *GoogleCloudAiplatformV1beta1ModelMonitoringObjectiveSpecTabularObjective `json:"tabularObjective,omitempty"` // TrainingDataset: Optional training dataset used to train the model. It can @@ -19628,6 +19656,8 @@ type GoogleCloudAiplatformV1beta1NearestNeighborQuery struct { // NeighborCount: Optional. The number of similar entities to be retrieved from // feature view for each query. NeighborCount int64 `json:"neighborCount,omitempty"` + // NumericFilters: Optional. The list of numeric filters. + NumericFilters []*GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter `json:"numericFilters,omitempty"` // Parameters: Optional. Parameters that can be set to tune query on the fly. Parameters *GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters `json:"parameters,omitempty"` // PerCrowdingAttributeNeighborCount: Optional. Crowding is a constraint on a @@ -19696,6 +19726,69 @@ func (s *GoogleCloudAiplatformV1beta1NearestNeighborQueryEmbedding) UnmarshalJSO return nil } +// 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 +type GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter struct { + // Name: Required. Column name in BigQuery that used as filters. + Name string `json:"name,omitempty"` + // Op: Optional. This MUST be specified for queries and must NOT be specified + // for database points. + // + // Possible values: + // "OPERATOR_UNSPECIFIED" - Unspecified operator. + // "LESS" - Entities are eligible if their value is < the query's. + // "LESS_EQUAL" - Entities are eligible if their value is <= the query's. + // "EQUAL" - Entities are eligible if their value is == the query's. + // "GREATER_EQUAL" - Entities are eligible if their value is >= the query's. + // "GREATER" - Entities are eligible if their value is > the query's. + // "NOT_EQUAL" - Entities are eligible if their value is != the query's. + Op string `json:"op,omitempty"` + // ValueDouble: double value type. + ValueDouble float64 `json:"valueDouble,omitempty"` + // ValueFloat: float value type. + ValueFloat float64 `json:"valueFloat,omitempty"` + // ValueInt: int value type. + ValueInt int64 `json:"valueInt,omitempty,string"` + // 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 GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1NearestNeighborQueryNumericFilter + var s1 struct { + ValueDouble gensupport.JSONFloat64 `json:"valueDouble"` + ValueFloat gensupport.JSONFloat64 `json:"valueFloat"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ValueDouble = float64(s1.ValueDouble) + s.ValueFloat = float64(s1.ValueFloat) + return nil +} + // GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters: Parameters that // can be overrided in each query to tune query latency and recall. type GoogleCloudAiplatformV1beta1NearestNeighborQueryParameters struct { @@ -20907,6 +21000,9 @@ type GoogleCloudAiplatformV1beta1PersistentResource struct { // (https://cloud.google.com/vertex-ai/docs/general/vpc-peering). If this field // is left unspecified, the resources aren't peered with any network. Network string `json:"network,omitempty"` + // PscInterfaceConfig: Optional. Configuration for PSC-I for + // PersistentResource. + PscInterfaceConfig *GoogleCloudAiplatformV1beta1PscInterfaceConfig `json:"pscInterfaceConfig,omitempty"` // ReservedIpRanges: Optional. A list of names for the reserved IP ranges under // the VPC network that can be used for this persistent resource. If set, we // will deploy the persistent resource within the provided IP ranges. @@ -21021,6 +21117,10 @@ type GoogleCloudAiplatformV1beta1PipelineJob struct { ReservedIpRanges []string `json:"reservedIpRanges,omitempty"` // RuntimeConfig: Runtime config of the pipeline. RuntimeConfig *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig `json:"runtimeConfig,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"` // ScheduleName: Output only. The schedule resource name. Only returned if the // Pipeline is created by Schedule API. ScheduleName string `json:"scheduleName,omitempty"` @@ -21864,6 +21964,37 @@ func (s GoogleCloudAiplatformV1beta1PscAutomatedEndpoints) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PscInterfaceConfig: Configuration for PSC-I. +type GoogleCloudAiplatformV1beta1PscInterfaceConfig struct { + // NetworkAttachment: Optional. The full name of the Compute Engine network + // attachment (https://cloud.google.com/vpc/docs/about-network-attachments) to + // attach to the resource. For example, + // `projects/12345/regions/us-central1/networkAttachments/myNA`. is of the form + // `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. + // Where {project} is a project number, as in `12345`, and {networkAttachment} + // is a network attachment name. To specify this field, you must have already + // [created a network attachment] + // (https://cloud.google.com/vpc/docs/create-manage-network-attachments#create-network-attachments). + // This field is only used for resources using PSC-I. + NetworkAttachment string `json:"networkAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "NetworkAttachment") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NetworkAttachment") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PscInterfaceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PscInterfaceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PublisherModel: A Model Garden Publisher Model. type GoogleCloudAiplatformV1beta1PublisherModel struct { // Frameworks: Optional. Additional information about the model's Frameworks. @@ -23388,6 +23519,8 @@ type GoogleCloudAiplatformV1beta1RagFile struct { // GoogleDriveSource: Output only. Google Drive location. Supports importing // individual files as well as Google Drive folders. GoogleDriveSource *GoogleCloudAiplatformV1beta1GoogleDriveSource `json:"googleDriveSource,omitempty"` + // JiraSource: The RagFile is imported from a Jira query. + JiraSource *GoogleCloudAiplatformV1beta1JiraSource `json:"jiraSource,omitempty"` // Name: Output only. The resource name of the RagFile. Name string `json:"name,omitempty"` // RagFileType: Output only. The type of the RagFile. @@ -23399,6 +23532,8 @@ type GoogleCloudAiplatformV1beta1RagFile struct { RagFileType string `json:"ragFileType,omitempty"` // SizeBytes: Output only. The size of the RagFile in bytes. SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // SlackSource: The RagFile is imported from a Slack channel. + SlackSource *GoogleCloudAiplatformV1beta1SlackSource `json:"slackSource,omitempty"` // UpdateTime: Output only. Timestamp when this RagFile was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -23502,6 +23637,29 @@ func (s GoogleCloudAiplatformV1beta1RawPredictRequest) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1RayLogsSpec: Configuration for the Ray OSS Logs. +type GoogleCloudAiplatformV1beta1RayLogsSpec struct { + // Disabled: Optional. Flag to disable the export of Ray OSS logs to Cloud + // Logging. + Disabled bool `json:"disabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Disabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1RayLogsSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1RayLogsSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RayMetricSpec: Configuration for the Ray // metrics. type GoogleCloudAiplatformV1beta1RayMetricSpec struct { @@ -23543,6 +23701,8 @@ type GoogleCloudAiplatformV1beta1RaySpec struct { // need all the resource pools to have the same Ray image. Otherwise, use the // {@code resource_pool_images} field. ImageUri string `json:"imageUri,omitempty"` + // RayLogsSpec: Optional. OSS Ray logging configurations. + RayLogsSpec *GoogleCloudAiplatformV1beta1RayLogsSpec `json:"rayLogsSpec,omitempty"` // RayMetricSpec: Optional. Ray metrics configurations. RayMetricSpec *GoogleCloudAiplatformV1beta1RayMetricSpec `json:"rayMetricSpec,omitempty"` // ResourcePoolImages: Optional. Required if image_uri isn't set. A map of @@ -24469,9 +24629,8 @@ func (s GoogleCloudAiplatformV1beta1ResumeScheduleRequest) MarshalJSON() ([]byte // GoogleCloudAiplatformV1beta1Retrieval: Defines a retrieval tool that model // can call to access external knowledge. type GoogleCloudAiplatformV1beta1Retrieval struct { - // DisableAttribution: Optional. Disable using the result from this tool in - // detecting grounding attribution. This does not affect how the result is - // given to the model for generation. + // DisableAttribution: Optional. Deprecated. This option is no longer + // supported. DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1beta1VertexAISearch `json:"vertexAiSearch,omitempty"` @@ -25439,6 +25598,14 @@ type GoogleCloudAiplatformV1beta1Scheduling struct { // restarted. This feature can be used by distributed training jobs that are // not resilient to workers leaving and joining a job. RestartJobOnWorkerRestart bool `json:"restartJobOnWorkerRestart,omitempty"` + // Strategy: Optional. This determines which type of scheduling strategy to + // use. + // + // Possible values: + // "STRATEGY_UNSPECIFIED" - Strategy will default to ON_DEMAND. + // "ON_DEMAND" - Regular on-demand provisioning strategy. + // "LOW_COST" - Low cost by making potential use of spot resources. + Strategy string `json:"strategy,omitempty"` // Timeout: The maximum job running time. The default is 7 days. Timeout string `json:"timeout,omitempty"` // ForceSendFields is a list of field names (e.g. "DisableRetries") to @@ -32267,6 +32434,84 @@ func (s GoogleCloudAiplatformV1beta1ShieldedVmConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SlackSource: The Slack source for the +// ImportRagFilesRequest. +type GoogleCloudAiplatformV1beta1SlackSource struct { + // Channels: Required. The Slack channels. + Channels []*GoogleCloudAiplatformV1beta1SlackSourceSlackChannels `json:"channels,omitempty"` + // ForceSendFields is a list of field names (e.g. "Channels") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Channels") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SlackSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SlackSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SlackSourceSlackChannels: SlackChannels contains +// the Slack channels and corresponding access token. +type GoogleCloudAiplatformV1beta1SlackSourceSlackChannels struct { + // ApiKeyConfig: Required. The SecretManager secret version resource name (e.g. + // projects/{project}/secrets/{secret}/versions/{version}) storing the Slack + // channel access token that has access to the slack channel IDs. See: + // https://api.slack.com/tutorials/tracks/getting-a-token. + ApiKeyConfig *GoogleCloudAiplatformV1beta1ApiAuthApiKeyConfig `json:"apiKeyConfig,omitempty"` + // Channels: Required. The Slack channel IDs. + Channels []*GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel `json:"channels,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiKeyConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiKeyConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SlackSourceSlackChannels) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SlackSourceSlackChannels + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel: +// SlackChannel contains the Slack channel ID and the time range to import. +type GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel struct { + // ChannelId: Required. The Slack channel ID. + ChannelId string `json:"channelId,omitempty"` + // EndTime: Optional. The ending timestamp for messages to import. + EndTime string `json:"endTime,omitempty"` + // StartTime: Optional. The starting timestamp for messages to import. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChannelId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChannelId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SlackSourceSlackChannelsSlackChannel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1SmoothGradConfig: Config for SmoothGrad // approximation of gradients. When enabled, the gradients are approximated by // averaging the gradients from noisy samples in the vicinity of the inputs. @@ -34044,6 +34289,7 @@ type GoogleCloudAiplatformV1beta1SupervisedHyperParameters struct { // "ADAPTER_SIZE_FOUR" - Adapter size 4. // "ADAPTER_SIZE_EIGHT" - Adapter size 8. // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. + // "ADAPTER_SIZE_THIRTY_TWO" - Adapter size 32. AdapterSize string `json:"adapterSize,omitempty"` // EpochCount: Optional. Number of complete passes the model makes over the // entire training dataset during training. @@ -37909,101 +38155,6 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type IntelligenceCloudAutomlXpsMetricEntry struct { - // ArgentumMetricId: For billing metrics that are using legacy sku's, set the - // legacy billing metric id here. This will be sent to Chemist as the - // "cloudbilling.googleapis.com/argentum_metric_id" label. Otherwise leave - // empty. - ArgentumMetricId string `json:"argentumMetricId,omitempty"` - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - // Int64Value: A signed 64-bit integer value. - Int64Value int64 `json:"int64Value,omitempty,string"` - // MetricName: The metric name defined in the service configuration. - MetricName string `json:"metricName,omitempty"` - // SystemLabels: Billing system labels for this (metric, value) pair. - SystemLabels []*IntelligenceCloudAutomlXpsMetricEntryLabel `json:"systemLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArgentumMetricId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArgentumMetricId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsMetricEntry) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsMetricEntry - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *IntelligenceCloudAutomlXpsMetricEntry) UnmarshalJSON(data []byte) error { - type NoMethod IntelligenceCloudAutomlXpsMetricEntry - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil -} - -type IntelligenceCloudAutomlXpsMetricEntryLabel struct { - // LabelName: The name of the label. - LabelName string `json:"labelName,omitempty"` - // LabelValue: The value of the label. - LabelValue string `json:"labelValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "LabelName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LabelName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsMetricEntryLabel) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsMetricEntryLabel - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type IntelligenceCloudAutomlXpsReportingMetrics struct { - // EffectiveTrainingDuration: The effective time training used. If set, this is - // used for quota management and billing. Deprecated. AutoML BE doesn't use - // this. Don't set. - EffectiveTrainingDuration string `json:"effectiveTrainingDuration,omitempty"` - // MetricEntries: One entry per metric name. The values must be aggregated per - // metric name. - MetricEntries []*IntelligenceCloudAutomlXpsMetricEntry `json:"metricEntries,omitempty"` - // ForceSendFields is a list of field names (e.g. "EffectiveTrainingDuration") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EffectiveTrainingDuration") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IntelligenceCloudAutomlXpsReportingMetrics) MarshalJSON() ([]byte, error) { - type NoMethod IntelligenceCloudAutomlXpsReportingMetrics - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type MediaUploadCall struct { s *Service parent string @@ -44204,7 +44355,7 @@ type ProjectsLocationsDatasetsPatchCall struct { // Patch: Updates a Dataset. // -// - name: Output only. The resource name of the Dataset. +// - name: Output only. Identifier. The resource name of the Dataset. func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1beta1dataset *GoogleCloudAiplatformV1beta1Dataset) *ProjectsLocationsDatasetsPatchCall { c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -47218,7 +47369,7 @@ type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { // Patch: Updates a DatasetVersion. // -// - name: Output only. The resource name of the DatasetVersion. +// - name: Output only. Identifier. The resource name of the DatasetVersion. func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1beta1datasetversion *GoogleCloudAiplatformV1beta1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -111972,9 +112123,16 @@ func (r *PublishersModelsService) Get(name string) *PublishersModelsGetCall { 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 { + c.urlParams_.Set("isHuggingFaceModel", fmt.Sprint(isHuggingFaceModel)) + return c +} + // LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 // language code representing the language in which the publisher model's text -// information should be written in (see go/bcp47). +// information should be written in. func (c *PublishersModelsGetCall) LanguageCode(languageCode string) *PublishersModelsGetCall { c.urlParams_.Set("languageCode", languageCode) return c @@ -112119,8 +112277,7 @@ func (c *PublishersModelsListCall) Filter(filter string) *PublishersModelsListCa // LanguageCode sets the optional parameter "languageCode": The IETF BCP-47 // language code representing the language in which the publisher models' text -// information should be written in (see go/bcp47). If not set, by default -// English (en). +// information should be written in. If not set, by default English (en). func (c *PublishersModelsListCall) LanguageCode(languageCode string) *PublishersModelsListCall { c.urlParams_.Set("languageCode", languageCode) return c diff --git a/analyticsadmin/v1alpha/analyticsadmin-api.json b/analyticsadmin/v1alpha/analyticsadmin-api.json index e6e55f70791..31626bd87bc 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-api.json +++ b/analyticsadmin/v1alpha/analyticsadmin-api.json @@ -209,7 +209,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"", + "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings`", "location": "path", "pattern": "^accounts/[^/]+/dataSharingSettings$", "required": true, @@ -349,7 +349,7 @@ ], "parameters": { "account": { - "description": "Required. The account resource for which to return change history resources. Format: accounts/{account} Example: \"accounts/100\"", + "description": "Required. The account resource for which to return change history resources. Format: accounts/{account} Example: `accounts/100`", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -2180,7 +2180,7 @@ "methods": { "create": { "deprecated": true, - "description": "Creates a conversion event with the specified attributes.", + "description": "Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event with the specified attributes.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", "httpMethod": "POST", "id": "analyticsadmin.properties.conversionEvents.create", @@ -2209,7 +2209,7 @@ }, "delete": { "deprecated": true, - "description": "Deletes a conversion event in a property.", + "description": "Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event in a property.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.conversionEvents.delete", @@ -2235,7 +2235,7 @@ }, "get": { "deprecated": true, - "description": "Retrieve a single conversion event.", + "description": "Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion event.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.conversionEvents.get", @@ -2262,7 +2262,7 @@ }, "list": { "deprecated": true, - "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", + "description": "Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents", "httpMethod": "GET", "id": "analyticsadmin.properties.conversionEvents.list", @@ -2300,7 +2300,7 @@ }, "patch": { "deprecated": true, - "description": "Updates a conversion event with the specified attributes.", + "description": "Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event with the specified attributes.", "flatPath": "v1alpha/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "PATCH", "id": "analyticsadmin.properties.conversionEvents.patch", @@ -2792,7 +2792,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: \"properties/123/dataStreams/456/globalSiteTag\"", + "description": "Required. The name of the site tag to lookup. Note that site tags are singletons and do not have unique IDs. Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: `properties/123/dataStreams/456/globalSiteTag`", "location": "path", "pattern": "^properties/[^/]+/dataStreams/[^/]+/globalSiteTag$", "required": true, @@ -3103,35 +3103,6 @@ } } }, - "eventEditRules": { - "methods": { - "reorder": { - "description": "Changes the processing order of event edit rules on the specified stream.", - "flatPath": "v1alpha/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventEditRules:reorder", - "httpMethod": "POST", - "id": "analyticsadmin.properties.dataStreams.eventEditRules.reorder", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Example format: properties/123/dataStreams/456", - "location": "path", - "pattern": "^properties/[^/]+/dataStreams/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+parent}/eventEditRules:reorder", - "request": { - "$ref": "GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" - } - } - } - }, "measurementProtocolSecrets": { "methods": { "create": { @@ -3938,7 +3909,7 @@ ], "parameters": { "parent": { - "description": "Required. Format: properties/{property_id} Example: properties/1234", + "description": "Required. Format: properties/{property_id} Example: `properties/1234`", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -3966,7 +3937,7 @@ ], "parameters": { "name": { - "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678", + "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: `properties/1234/firebaseLinks/5678`", "location": "path", "pattern": "^properties/[^/]+/firebaseLinks/[^/]+$", "required": true, @@ -4002,7 +3973,7 @@ "type": "string" }, "parent": { - "description": "Required. Format: properties/{property_id} Example: properties/1234", + "description": "Required. Format: properties/{property_id} Example: `properties/1234`", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -4733,7 +4704,7 @@ } } }, - "revision": "20240707", + "revision": "20240722", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1alphaAccessBetweenFilter": { @@ -8326,20 +8297,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest": { - "description": "Request message for ReorderEventEditRules RPC.", - "id": "GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest", - "properties": { - "eventEditRules": { - "description": "Required. EventEditRule resource names for the specified data stream, in the needed processing order. All EventEditRules for the stream must be present in the list.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink": { "description": "A link that references a source property under the parent rollup property.", "id": "GoogleAnalyticsAdminV1alphaRollupPropertySourceLink", @@ -8577,7 +8534,7 @@ "type": "string" }, "property": { - "description": "Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId} Example: \"properties/100\"", + "description": "Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId} Example: `properties/100`", "type": "string" }, "resourceType": { diff --git a/analyticsadmin/v1alpha/analyticsadmin-gen.go b/analyticsadmin/v1alpha/analyticsadmin-gen.go index 878eba4b098..c087dd4bfcd 100644 --- a/analyticsadmin/v1alpha/analyticsadmin-gen.go +++ b/analyticsadmin/v1alpha/analyticsadmin-gen.go @@ -356,7 +356,6 @@ type PropertiesCustomMetricsService struct { func NewPropertiesDataStreamsService(s *Service) *PropertiesDataStreamsService { rs := &PropertiesDataStreamsService{s: s} rs.EventCreateRules = NewPropertiesDataStreamsEventCreateRulesService(s) - rs.EventEditRules = NewPropertiesDataStreamsEventEditRulesService(s) rs.MeasurementProtocolSecrets = NewPropertiesDataStreamsMeasurementProtocolSecretsService(s) rs.SKAdNetworkConversionValueSchema = NewPropertiesDataStreamsSKAdNetworkConversionValueSchemaService(s) return rs @@ -367,8 +366,6 @@ type PropertiesDataStreamsService struct { EventCreateRules *PropertiesDataStreamsEventCreateRulesService - EventEditRules *PropertiesDataStreamsEventEditRulesService - MeasurementProtocolSecrets *PropertiesDataStreamsMeasurementProtocolSecretsService SKAdNetworkConversionValueSchema *PropertiesDataStreamsSKAdNetworkConversionValueSchemaService @@ -383,15 +380,6 @@ type PropertiesDataStreamsEventCreateRulesService struct { s *Service } -func NewPropertiesDataStreamsEventEditRulesService(s *Service) *PropertiesDataStreamsEventEditRulesService { - rs := &PropertiesDataStreamsEventEditRulesService{s: s} - return rs -} - -type PropertiesDataStreamsEventEditRulesService struct { - s *Service -} - func NewPropertiesDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesDataStreamsMeasurementProtocolSecretsService { rs := &PropertiesDataStreamsMeasurementProtocolSecretsService{s: s} return rs @@ -5453,31 +5441,6 @@ func (s GoogleAnalyticsAdminV1alphaProvisionAccountTicketResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest: Request message for -// ReorderEventEditRules RPC. -type GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest struct { - // EventEditRules: Required. EventEditRule resource names for the specified - // data stream, in the needed processing order. All EventEditRules for the - // stream must be present in the list. - EventEditRules []string `json:"eventEditRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventEditRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EventEditRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1alphaRollupPropertySourceLink: A link that references // a source property under the parent rollup property. type GoogleAnalyticsAdminV1alphaRollupPropertySourceLink struct { @@ -5779,7 +5742,7 @@ type GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest struct { PageToken string `json:"pageToken,omitempty"` // Property: Optional. Resource name for a child property. If set, only return // changes made to this property or its child resources. Format: - // properties/{propertyId} Example: "properties/100" + // properties/{propertyId} Example: `properties/100` Property string `json:"property,omitempty"` // ResourceType: Optional. If set, only return changes if they are for a // resource that matches at least one of these types. @@ -6491,7 +6454,7 @@ type AccountsGetDataSharingSettingsCall struct { // // - name: The name of the settings to lookup. Format: // accounts/{account}/dataSharingSettings Example: -// "accounts/1000/dataSharingSettings". +// `accounts/1000/dataSharingSettings`. func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall { c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7078,7 +7041,7 @@ type AccountsSearchChangeHistoryEventsCall struct { // children given the specified set of filters. // // - account: The account resource for which to return change history -// resources. Format: accounts/{account} Example: "accounts/100". +// resources. Format: accounts/{account} Example: `accounts/100`. func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1alphasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1alphaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall { c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.account = account @@ -14212,7 +14175,8 @@ type PropertiesConversionEventsCreateCall struct { header_ http.Header } -// Create: Creates a conversion event with the specified attributes. +// Create: Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event +// with the specified attributes. // // - parent: The resource name of the parent property where this conversion // event will be created. Format: properties/123. @@ -14314,7 +14278,8 @@ type PropertiesConversionEventsDeleteCall struct { header_ http.Header } -// Delete: Deletes a conversion event in a property. +// Delete: Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event +// in a property. // // - name: The resource name of the conversion event to delete. Format: // properties/{property}/conversionEvents/{conversion_event} Example: @@ -14413,7 +14378,8 @@ type PropertiesConversionEventsGetCall struct { header_ http.Header } -// Get: Retrieve a single conversion event. +// Get: Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion +// event. // // - name: The resource name of the conversion event to retrieve. Format: // properties/{property}/conversionEvents/{conversion_event} Example: @@ -14523,8 +14489,9 @@ type PropertiesConversionEventsListCall struct { header_ http.Header } -// List: Returns a list of conversion events in the specified parent property. -// Returns an empty list if no conversion events are found. +// List: Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion +// events in the specified parent property. Returns an empty list if no +// conversion events are found. // // - parent: The resource name of the parent property. Example: // 'properties/123'. @@ -14671,7 +14638,8 @@ type PropertiesConversionEventsPatchCall struct { header_ http.Header } -// Patch: Updates a conversion event with the specified attributes. +// Patch: Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event +// with the specified attributes. // // - name: Output only. Resource name of this conversion event. Format: // properties/{property}/conversionEvents/{conversion_event}. @@ -16463,7 +16431,7 @@ type PropertiesDataStreamsGetGlobalSiteTagCall struct { // - name: The name of the site tag to lookup. Note that site tags are // singletons and do not have unique IDs. Format: // properties/{property_id}/dataStreams/{stream_id}/globalSiteTag Example: -// "properties/123/dataStreams/456/globalSiteTag". +// `properties/123/dataStreams/456/globalSiteTag`. func (r *PropertiesDataStreamsService) GetGlobalSiteTag(name string) *PropertiesDataStreamsGetGlobalSiteTagCall { c := &PropertiesDataStreamsGetGlobalSiteTagCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -17617,109 +17585,6 @@ func (c *PropertiesDataStreamsEventCreateRulesPatchCall) Do(opts ...googleapi.Ca return ret, nil } -type PropertiesDataStreamsEventEditRulesReorderCall struct { - s *Service - parent string - googleanalyticsadminv1alphareordereventeditrulesrequest *GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reorder: Changes the processing order of event edit rules on the specified -// stream. -// -// - parent: Example format: properties/123/dataStreams/456. -func (r *PropertiesDataStreamsEventEditRulesService) Reorder(parent string, googleanalyticsadminv1alphareordereventeditrulesrequest *GoogleAnalyticsAdminV1alphaReorderEventEditRulesRequest) *PropertiesDataStreamsEventEditRulesReorderCall { - c := &PropertiesDataStreamsEventEditRulesReorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1alphareordereventeditrulesrequest = googleanalyticsadminv1alphareordereventeditrulesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventEditRulesReorderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Context(ctx context.Context) *PropertiesDataStreamsEventEditRulesReorderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesDataStreamsEventEditRulesReorderCall) 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.googleanalyticsadminv1alphareordereventeditrulesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/eventEditRules:reorder") - 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 "analyticsadmin.properties.dataStreams.eventEditRules.reorder" 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 *PropertiesDataStreamsEventEditRulesReorderCall) 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 PropertiesDataStreamsMeasurementProtocolSecretsCreateCall struct { s *Service parent string @@ -20689,7 +20554,7 @@ type PropertiesFirebaseLinksCreateCall struct { // Create: Creates a FirebaseLink. Properties can have at most one // FirebaseLink. // -// - parent: Format: properties/{property_id} Example: properties/1234. +// - parent: Format: properties/{property_id} Example: `properties/1234`. func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1alphafirebaselink *GoogleAnalyticsAdminV1alphaFirebaseLink) *PropertiesFirebaseLinksCreateCall { c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -20791,7 +20656,7 @@ type PropertiesFirebaseLinksDeleteCall struct { // Delete: Deletes a FirebaseLink on a property // // - name: Format: properties/{property_id}/firebaseLinks/{firebase_link_id} -// Example: properties/1234/firebaseLinks/5678. +// Example: `properties/1234/firebaseLinks/5678`. func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall { c := &PropertiesFirebaseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -20889,7 +20754,7 @@ type PropertiesFirebaseLinksListCall struct { // List: Lists FirebaseLinks on a property. Properties can have at most one // FirebaseLink. // -// - parent: Format: properties/{property_id} Example: properties/1234. +// - parent: Format: properties/{property_id} Example: `properties/1234`. func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall { c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/analyticsadmin/v1beta/analyticsadmin-api.json b/analyticsadmin/v1beta/analyticsadmin-api.json index 3a11a33dc20..bb07cc7763d 100644 --- a/analyticsadmin/v1beta/analyticsadmin-api.json +++ b/analyticsadmin/v1beta/analyticsadmin-api.json @@ -203,7 +203,7 @@ ], "parameters": { "name": { - "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: \"accounts/1000/dataSharingSettings\"", + "description": "Required. The name of the settings to lookup. Format: accounts/{account}/dataSharingSettings Example: `accounts/1000/dataSharingSettings`", "location": "path", "pattern": "^accounts/[^/]+/dataSharingSettings$", "required": true, @@ -343,7 +343,7 @@ ], "parameters": { "account": { - "description": "Required. The account resource for which to return change history resources. Format: accounts/{account} Example: \"accounts/100\"", + "description": "Required. The account resource for which to return change history resources. Format: accounts/{account} Example: `accounts/100`", "location": "path", "pattern": "^accounts/[^/]+$", "required": true, @@ -630,7 +630,7 @@ "methods": { "create": { "deprecated": true, - "description": "Creates a conversion event with the specified attributes.", + "description": "Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event with the specified attributes.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", "httpMethod": "POST", "id": "analyticsadmin.properties.conversionEvents.create", @@ -659,7 +659,7 @@ }, "delete": { "deprecated": true, - "description": "Deletes a conversion event in a property.", + "description": "Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event in a property.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "DELETE", "id": "analyticsadmin.properties.conversionEvents.delete", @@ -685,7 +685,7 @@ }, "get": { "deprecated": true, - "description": "Retrieve a single conversion event.", + "description": "Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion event.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "GET", "id": "analyticsadmin.properties.conversionEvents.get", @@ -712,7 +712,7 @@ }, "list": { "deprecated": true, - "description": "Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", + "description": "Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents", "httpMethod": "GET", "id": "analyticsadmin.properties.conversionEvents.list", @@ -750,7 +750,7 @@ }, "patch": { "deprecated": true, - "description": "Updates a conversion event with the specified attributes.", + "description": "Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event with the specified attributes.", "flatPath": "v1beta/properties/{propertiesId}/conversionEvents/{conversionEventsId}", "httpMethod": "PATCH", "id": "analyticsadmin.properties.conversionEvents.patch", @@ -1253,35 +1253,6 @@ } }, "resources": { - "eventEditRules": { - "methods": { - "reorder": { - "description": "Changes the processing order of event edit rules on the specified stream.", - "flatPath": "v1beta/properties/{propertiesId}/dataStreams/{dataStreamsId}/eventEditRules:reorder", - "httpMethod": "POST", - "id": "analyticsadmin.properties.dataStreams.eventEditRules.reorder", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Example format: properties/123/dataStreams/456", - "location": "path", - "pattern": "^properties/[^/]+/dataStreams/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+parent}/eventEditRules:reorder", - "request": { - "$ref": "GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest" - }, - "response": { - "$ref": "GoogleProtobufEmpty" - } - } - } - }, "measurementProtocolSecrets": { "methods": { "create": { @@ -1450,7 +1421,7 @@ ], "parameters": { "parent": { - "description": "Required. Format: properties/{property_id} Example: properties/1234", + "description": "Required. Format: properties/{property_id} Example: `properties/1234`", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -1478,7 +1449,7 @@ ], "parameters": { "name": { - "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: properties/1234/firebaseLinks/5678", + "description": "Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} Example: `properties/1234/firebaseLinks/5678`", "location": "path", "pattern": "^properties/[^/]+/firebaseLinks/[^/]+$", "required": true, @@ -1514,7 +1485,7 @@ "type": "string" }, "parent": { - "description": "Required. Format: properties/{property_id} Example: properties/1234", + "description": "Required. Format: properties/{property_id} Example: `properties/1234`", "location": "path", "pattern": "^properties/[^/]+$", "required": true, @@ -1817,7 +1788,7 @@ } } }, - "revision": "20240529", + "revision": "20240722", "rootUrl": "https://analyticsadmin.googleapis.com/", "schemas": { "GoogleAnalyticsAdminV1betaAccessBetweenFilter": { @@ -3352,20 +3323,6 @@ }, "type": "object" }, - "GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest": { - "description": "Request message for ReorderEventEditRules RPC.", - "id": "GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest", - "properties": { - "eventEditRules": { - "description": "Required. EventEditRule resource names for the specified data stream, in the needed processing order. All EventEditRules for the stream must be present in the list.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleAnalyticsAdminV1betaRunAccessReportRequest": { "description": "The request for a Data Access Record Report.", "id": "GoogleAnalyticsAdminV1betaRunAccessReportRequest", @@ -3522,7 +3479,7 @@ "type": "string" }, "property": { - "description": "Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId} Example: \"properties/100\"", + "description": "Optional. Resource name for a child property. If set, only return changes made to this property or its child resources. Format: properties/{propertyId} Example: `properties/100`", "type": "string" }, "resourceType": { diff --git a/analyticsadmin/v1beta/analyticsadmin-gen.go b/analyticsadmin/v1beta/analyticsadmin-gen.go index 46cbb394770..8b99baada7c 100644 --- a/analyticsadmin/v1beta/analyticsadmin-gen.go +++ b/analyticsadmin/v1beta/analyticsadmin-gen.go @@ -245,7 +245,6 @@ type PropertiesCustomMetricsService struct { func NewPropertiesDataStreamsService(s *Service) *PropertiesDataStreamsService { rs := &PropertiesDataStreamsService{s: s} - rs.EventEditRules = NewPropertiesDataStreamsEventEditRulesService(s) rs.MeasurementProtocolSecrets = NewPropertiesDataStreamsMeasurementProtocolSecretsService(s) return rs } @@ -253,20 +252,9 @@ func NewPropertiesDataStreamsService(s *Service) *PropertiesDataStreamsService { type PropertiesDataStreamsService struct { s *Service - EventEditRules *PropertiesDataStreamsEventEditRulesService - MeasurementProtocolSecrets *PropertiesDataStreamsMeasurementProtocolSecretsService } -func NewPropertiesDataStreamsEventEditRulesService(s *Service) *PropertiesDataStreamsEventEditRulesService { - rs := &PropertiesDataStreamsEventEditRulesService{s: s} - return rs -} - -type PropertiesDataStreamsEventEditRulesService struct { - s *Service -} - func NewPropertiesDataStreamsMeasurementProtocolSecretsService(s *Service) *PropertiesDataStreamsMeasurementProtocolSecretsService { rs := &PropertiesDataStreamsMeasurementProtocolSecretsService{s: s} return rs @@ -2346,31 +2334,6 @@ func (s GoogleAnalyticsAdminV1betaProvisionAccountTicketResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest: Request message for -// ReorderEventEditRules RPC. -type GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest struct { - // EventEditRules: Required. EventEditRule resource names for the specified - // data stream, in the needed processing order. All EventEditRules for the - // stream must be present in the list. - EventEditRules []string `json:"eventEditRules,omitempty"` - // ForceSendFields is a list of field names (e.g. "EventEditRules") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EventEditRules") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // GoogleAnalyticsAdminV1betaRunAccessReportRequest: The request for a Data // Access Record Report. type GoogleAnalyticsAdminV1betaRunAccessReportRequest struct { @@ -2534,7 +2497,7 @@ type GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest struct { PageToken string `json:"pageToken,omitempty"` // Property: Optional. Resource name for a child property. If set, only return // changes made to this property or its child resources. Format: - // properties/{propertyId} Example: "properties/100" + // properties/{propertyId} Example: `properties/100` Property string `json:"property,omitempty"` // ResourceType: Optional. If set, only return changes if they are for a // resource that matches at least one of these types. @@ -2983,7 +2946,7 @@ type AccountsGetDataSharingSettingsCall struct { // // - name: The name of the settings to lookup. Format: // accounts/{account}/dataSharingSettings Example: -// "accounts/1000/dataSharingSettings". +// `accounts/1000/dataSharingSettings`. func (r *AccountsService) GetDataSharingSettings(name string) *AccountsGetDataSharingSettingsCall { c := &AccountsGetDataSharingSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3570,7 +3533,7 @@ type AccountsSearchChangeHistoryEventsCall struct { // children given the specified set of filters. // // - account: The account resource for which to return change history -// resources. Format: accounts/{account} Example: "accounts/100". +// resources. Format: accounts/{account} Example: `accounts/100`. func (r *AccountsService) SearchChangeHistoryEvents(account string, googleanalyticsadminv1betasearchchangehistoryeventsrequest *GoogleAnalyticsAdminV1betaSearchChangeHistoryEventsRequest) *AccountsSearchChangeHistoryEventsCall { c := &AccountsSearchChangeHistoryEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.account = account @@ -4727,7 +4690,8 @@ type PropertiesConversionEventsCreateCall struct { header_ http.Header } -// Create: Creates a conversion event with the specified attributes. +// Create: Deprecated: Use `CreateKeyEvent` instead. Creates a conversion event +// with the specified attributes. // // - parent: The resource name of the parent property where this conversion // event will be created. Format: properties/123. @@ -4829,7 +4793,8 @@ type PropertiesConversionEventsDeleteCall struct { header_ http.Header } -// Delete: Deletes a conversion event in a property. +// Delete: Deprecated: Use `DeleteKeyEvent` instead. Deletes a conversion event +// in a property. // // - name: The resource name of the conversion event to delete. Format: // properties/{property}/conversionEvents/{conversion_event} Example: @@ -4928,7 +4893,8 @@ type PropertiesConversionEventsGetCall struct { header_ http.Header } -// Get: Retrieve a single conversion event. +// Get: Deprecated: Use `GetKeyEvent` instead. Retrieve a single conversion +// event. // // - name: The resource name of the conversion event to retrieve. Format: // properties/{property}/conversionEvents/{conversion_event} Example: @@ -5038,8 +5004,9 @@ type PropertiesConversionEventsListCall struct { header_ http.Header } -// List: Returns a list of conversion events in the specified parent property. -// Returns an empty list if no conversion events are found. +// List: Deprecated: Use `ListKeyEvents` instead. Returns a list of conversion +// events in the specified parent property. Returns an empty list if no +// conversion events are found. // // - parent: The resource name of the parent property. Example: // 'properties/123'. @@ -5188,7 +5155,8 @@ type PropertiesConversionEventsPatchCall struct { header_ http.Header } -// Patch: Updates a conversion event with the specified attributes. +// Patch: Deprecated: Use `UpdateKeyEvent` instead. Updates a conversion event +// with the specified attributes. // // - name: Output only. Resource name of this conversion event. Format: // properties/{property}/conversionEvents/{conversion_event}. @@ -7001,109 +6969,6 @@ func (c *PropertiesDataStreamsPatchCall) Do(opts ...googleapi.CallOption) (*Goog return ret, nil } -type PropertiesDataStreamsEventEditRulesReorderCall struct { - s *Service - parent string - googleanalyticsadminv1betareordereventeditrulesrequest *GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Reorder: Changes the processing order of event edit rules on the specified -// stream. -// -// - parent: Example format: properties/123/dataStreams/456. -func (r *PropertiesDataStreamsEventEditRulesService) Reorder(parent string, googleanalyticsadminv1betareordereventeditrulesrequest *GoogleAnalyticsAdminV1betaReorderEventEditRulesRequest) *PropertiesDataStreamsEventEditRulesReorderCall { - c := &PropertiesDataStreamsEventEditRulesReorderCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleanalyticsadminv1betareordereventeditrulesrequest = googleanalyticsadminv1betareordereventeditrulesrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Fields(s ...googleapi.Field) *PropertiesDataStreamsEventEditRulesReorderCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Context(ctx context.Context) *PropertiesDataStreamsEventEditRulesReorderCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PropertiesDataStreamsEventEditRulesReorderCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PropertiesDataStreamsEventEditRulesReorderCall) 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.googleanalyticsadminv1betareordereventeditrulesrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/eventEditRules:reorder") - 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 "analyticsadmin.properties.dataStreams.eventEditRules.reorder" 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 *PropertiesDataStreamsEventEditRulesReorderCall) 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 PropertiesDataStreamsMeasurementProtocolSecretsCreateCall struct { s *Service parent string @@ -7688,7 +7553,7 @@ type PropertiesFirebaseLinksCreateCall struct { // Create: Creates a FirebaseLink. Properties can have at most one // FirebaseLink. // -// - parent: Format: properties/{property_id} Example: properties/1234. +// - parent: Format: properties/{property_id} Example: `properties/1234`. func (r *PropertiesFirebaseLinksService) Create(parent string, googleanalyticsadminv1betafirebaselink *GoogleAnalyticsAdminV1betaFirebaseLink) *PropertiesFirebaseLinksCreateCall { c := &PropertiesFirebaseLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -7790,7 +7655,7 @@ type PropertiesFirebaseLinksDeleteCall struct { // Delete: Deletes a FirebaseLink on a property // // - name: Format: properties/{property_id}/firebaseLinks/{firebase_link_id} -// Example: properties/1234/firebaseLinks/5678. +// Example: `properties/1234/firebaseLinks/5678`. func (r *PropertiesFirebaseLinksService) Delete(name string) *PropertiesFirebaseLinksDeleteCall { c := &PropertiesFirebaseLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -7888,7 +7753,7 @@ type PropertiesFirebaseLinksListCall struct { // List: Lists FirebaseLinks on a property. Properties can have at most one // FirebaseLink. // -// - parent: Format: properties/{property_id} Example: properties/1234. +// - parent: Format: properties/{property_id} Example: `properties/1234`. func (r *PropertiesFirebaseLinksService) List(parent string) *PropertiesFirebaseLinksListCall { c := &PropertiesFirebaseLinksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/apim/v1alpha/apim-api.json b/apim/v1alpha/apim-api.json index a266bc5e071..32f79360992 100644 --- a/apim/v1alpha/apim-api.json +++ b/apim/v1alpha/apim-api.json @@ -174,6 +174,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "listApiObservationTags": { + "description": "ListApiObservationTags lists all extant tags on any observation in the given project.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}:listApiObservationTags", + "httpMethod": "GET", + "id": "apim.projects.locations.listApiObservationTags", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of tags to return. The service may return fewer than this value. If unspecified, at most 10 tags will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListApiObservationTags` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListApiObservationTags` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent, which owns this collection of tags. Format: projects/{project}/locations/{location}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}:listApiObservationTags", + "response": { + "$ref": "ListApiObservationTagsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -324,7 +360,7 @@ ] }, "list": { - "description": "ListObservationJobs gets all ObservationJobs for a given project and location", + "description": "ListObservationJobs gets all ObservationJobs for a given project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs", "httpMethod": "GET", "id": "apim.projects.locations.observationJobs.list", @@ -363,6 +399,34 @@ "resources": { "apiObservations": { "methods": { + "batchEditTags": { + "description": "BatchEditTagsApiObservations adds or removes Tags for ApiObservations.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations:batchEditTags", + "httpMethod": "POST", + "id": "apim.projects.locations.observationJobs.apiObservations.batchEditTags", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource shared by all ApiObservations being edited. Format: projects/{project}/locations/{location}/observationJobs/{observation_job}", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/observationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/apiObservations:batchEditTags", + "request": { + "$ref": "BatchEditTagsApiObservationsRequest" + }, + "response": { + "$ref": "BatchEditTagsApiObservationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "GetApiObservation retrieves a single ApiObservation by name.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations/{apiObservationsId}", @@ -389,7 +453,7 @@ ] }, "list": { - "description": "ListApiObservations gets all ApiObservations for a given project and location and ObservationJob", + "description": "ListApiObservations gets all ApiObservations for a given project and location and ObservationJob.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations", "httpMethod": "GET", "id": "apim.projects.locations.observationJobs.apiObservations.list", @@ -454,7 +518,7 @@ ] }, "list": { - "description": "ListApiOperations gets all ApiOperations for a given project and location and ObservationJob and ApiObservation", + "description": "ListApiOperations gets all ApiOperations for a given project and location and ObservationJob and ApiObservation.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationJobs/{observationJobsId}/apiObservations/{apiObservationsId}/apiOperations", "httpMethod": "GET", "id": "apim.projects.locations.observationJobs.apiObservations.apiOperations.list", @@ -586,7 +650,7 @@ ] }, "list": { - "description": "ListObservationSources gets all ObservationSources for a given project and location", + "description": "ListObservationSources gets all ObservationSources for a given project and location.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/observationSources", "httpMethod": "GET", "id": "apim.projects.locations.observationSources.list", @@ -751,7 +815,7 @@ } } }, - "revision": "20240605", + "revision": "20240717", "rootUrl": "https://apim.googleapis.com/", "schemas": { "ApiObservation": { @@ -856,6 +920,34 @@ }, "type": "object" }, + "BatchEditTagsApiObservationsRequest": { + "description": "Message for requesting batch edit tags for ApiObservations", + "id": "BatchEditTagsApiObservationsRequest", + "properties": { + "requests": { + "description": "Required. The request message specifying the resources to update. A maximum of 1000 apiObservations can be modified in a batch.", + "items": { + "$ref": "EditTagsApiObservationsRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchEditTagsApiObservationsResponse": { + "description": "Message for response to edit Tags for ApiObservations", + "id": "BatchEditTagsApiObservationsResponse", + "properties": { + "apiObservations": { + "description": "ApiObservations that were changed", + "items": { + "$ref": "ApiObservation" + }, + "type": "array" + } + }, + "type": "object" + }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", @@ -868,6 +960,24 @@ "properties": {}, "type": "object" }, + "EditTagsApiObservationsRequest": { + "description": "Message for requesting edit tags for ApiObservation", + "id": "EditTagsApiObservationsRequest", + "properties": { + "apiObservationId": { + "description": "Required. Identifier of ApiObservation need to be edit tags Format example: \"apigee.googleapis.com|us-west1|443\"", + "type": "string" + }, + "tagActions": { + "description": "Required. Tag actions to be applied", + "items": { + "$ref": "TagAction" + }, + "type": "array" + } + }, + "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", @@ -1110,6 +1220,24 @@ }, "type": "object" }, + "ListApiObservationTagsResponse": { + "description": "Message for response to listing tags", + "id": "ListApiObservationTagsResponse", + "properties": { + "apiObservationTags": { + "description": "The tags from the specified project", + "items": { + "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.", + "type": "string" + } + }, + "type": "object" + }, "ListApiObservationsResponse": { "description": "Message for response to listing ApiObservations", "id": "ListApiObservationsResponse", @@ -1472,6 +1600,31 @@ } }, "type": "object" + }, + "TagAction": { + "description": "Message for edit tag action", + "id": "TagAction", + "properties": { + "action": { + "description": "Required. Action to be applied", + "enum": [ + "ACTION_UNSPECIFIED", + "ADD", + "REMOVE" + ], + "enumDescriptions": [ + "Unspecified.", + "Addition of a Tag.", + "Removal of a Tag." + ], + "type": "string" + }, + "tag": { + "description": "Required. Tag to be added or removed", + "type": "string" + } + }, + "type": "object" } }, "servicePath": "", diff --git a/apim/v1alpha/apim-gen.go b/apim/v1alpha/apim-gen.go index 5a0c1253dbc..31bbfc9e4b0 100644 --- a/apim/v1alpha/apim-gen.go +++ b/apim/v1alpha/apim-gen.go @@ -320,6 +320,56 @@ func (s ApiOperation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BatchEditTagsApiObservationsRequest: Message for requesting batch edit tags +// for ApiObservations +type BatchEditTagsApiObservationsRequest struct { + // Requests: Required. The request message specifying the resources to update. + // A maximum of 1000 apiObservations can be modified in a batch. + Requests []*EditTagsApiObservationsRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Requests") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BatchEditTagsApiObservationsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchEditTagsApiObservationsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BatchEditTagsApiObservationsResponse: Message for response to edit Tags for +// ApiObservations +type BatchEditTagsApiObservationsResponse struct { + // ApiObservations: ApiObservations that were changed + ApiObservations []*ApiObservation `json:"apiObservations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ApiObservations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiObservations") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BatchEditTagsApiObservationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchEditTagsApiObservationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } @@ -328,6 +378,32 @@ type CancelOperationRequest struct { type DisableObservationJobRequest struct { } +// EditTagsApiObservationsRequest: Message for requesting edit tags for +// ApiObservation +type EditTagsApiObservationsRequest struct { + // ApiObservationId: Required. Identifier of ApiObservation need to be edit + // tags Format example: "apigee.googleapis.com|us-west1|443" + ApiObservationId string `json:"apiObservationId,omitempty"` + // TagActions: Required. Tag actions to be applied + TagActions []*TagAction `json:"tagActions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiObservationId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiObservationId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s EditTagsApiObservationsRequest) MarshalJSON() ([]byte, error) { + type NoMethod EditTagsApiObservationsRequest + 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 @@ -586,6 +662,34 @@ func (s HttpOperationQueryParam) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListApiObservationTagsResponse: Message for response to listing tags +type ListApiObservationTagsResponse struct { + // ApiObservationTags: The tags from the specified project + ApiObservationTags []string `json:"apiObservationTags,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next page. If this field is omitted, there are no subsequent pages. + 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. "ApiObservationTags") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiObservationTags") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListApiObservationTagsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListApiObservationTagsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListApiObservationsResponse: Message for response to listing ApiObservations type ListApiObservationsResponse struct { // ApiObservations: The ApiObservation from the specified project and location @@ -1004,6 +1108,35 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TagAction: Message for edit tag action +type TagAction struct { + // Action: Required. Action to be applied + // + // Possible values: + // "ACTION_UNSPECIFIED" - Unspecified. + // "ADD" - Addition of a Tag. + // "REMOVE" - Removal of a Tag. + Action string `json:"action,omitempty"` + // Tag: Required. Tag to be added or removed + Tag string `json:"tag,omitempty"` + // ForceSendFields is a list of field names (e.g. "Action") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TagAction) MarshalJSON() ([]byte, error) { + type NoMethod TagAction + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ProjectsLocationsGetCall struct { s *Service name string @@ -1264,6 +1397,155 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +type ProjectsLocationsListApiObservationTagsCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListApiObservationTags: ListApiObservationTags lists all extant tags on any +// observation in the given project. +// +// - parent: The parent, which owns this collection of tags. Format: +// projects/{project}/locations/{location}. +func (r *ProjectsLocationsService) ListApiObservationTags(parent string) *ProjectsLocationsListApiObservationTagsCall { + c := &ProjectsLocationsListApiObservationTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of tags +// to return. The service may return fewer than this value. If unspecified, at +// most 10 tags will be returned. The maximum value is 1000; values above 1000 +// will be coerced to 1000. +func (c *ProjectsLocationsListApiObservationTagsCall) PageSize(pageSize int64) *ProjectsLocationsListApiObservationTagsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListApiObservationTags` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListApiObservationTags` must match the call that provided the page token. +func (c *ProjectsLocationsListApiObservationTagsCall) PageToken(pageToken string) *ProjectsLocationsListApiObservationTagsCall { + 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 *ProjectsLocationsListApiObservationTagsCall) Fields(s ...googleapi.Field) *ProjectsLocationsListApiObservationTagsCall { + 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 *ProjectsLocationsListApiObservationTagsCall) IfNoneMatch(entityTag string) *ProjectsLocationsListApiObservationTagsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListApiObservationTagsCall) Context(ctx context.Context) *ProjectsLocationsListApiObservationTagsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsListApiObservationTagsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListApiObservationTagsCall) 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}:listApiObservationTags") + 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 "apim.projects.locations.listApiObservationTags" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListApiObservationTagsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsListApiObservationTagsCall) Do(opts ...googleapi.CallOption) (*ListApiObservationTagsResponse, 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 := &ListApiObservationTagsResponse{ + 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 *ProjectsLocationsListApiObservationTagsCall) Pages(ctx context.Context, f func(*ListApiObservationTagsResponse) 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 ProjectsLocationsObservationJobsCreateCall struct { s *Service parent string @@ -1812,7 +2094,7 @@ type ProjectsLocationsObservationJobsListCall struct { } // List: ListObservationJobs gets all ObservationJobs for a given project and -// location +// location. // // - parent: The parent, which owns this collection of ObservationJobs. Format: // projects/{project}/locations/{location}. @@ -1951,6 +2233,111 @@ func (c *ProjectsLocationsObservationJobsListCall) Pages(ctx context.Context, f } } +type ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall struct { + s *Service + parent string + batchedittagsapiobservationsrequest *BatchEditTagsApiObservationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchEditTags: BatchEditTagsApiObservations adds or removes Tags for +// ApiObservations. +// +// - parent: The parent resource shared by all ApiObservations being edited. +// Format: +// projects/{project}/locations/{location}/observationJobs/{observation_job}. +func (r *ProjectsLocationsObservationJobsApiObservationsService) BatchEditTags(parent string, batchedittagsapiobservationsrequest *BatchEditTagsApiObservationsRequest) *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall { + c := &ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchedittagsapiobservationsrequest = batchedittagsapiobservationsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall) Fields(s ...googleapi.Field) *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall) Context(ctx context.Context) *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall) 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.batchedittagsapiobservationsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/apiObservations:batchEditTags") + 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 "apim.projects.locations.observationJobs.apiObservations.batchEditTags" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchEditTagsApiObservationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsObservationJobsApiObservationsBatchEditTagsCall) Do(opts ...googleapi.CallOption) (*BatchEditTagsApiObservationsResponse, 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 := &BatchEditTagsApiObservationsResponse{ + 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 ProjectsLocationsObservationJobsApiObservationsGetCall struct { s *Service name string @@ -2070,7 +2457,7 @@ type ProjectsLocationsObservationJobsApiObservationsListCall struct { } // List: ListApiObservations gets all ApiObservations for a given project and -// location and ObservationJob +// location and ObservationJob. // // - parent: The parent, which owns this collection of ApiObservations. Format: // projects/{project}/locations/{location}/observationJobs/{observation_job}. @@ -2328,7 +2715,7 @@ type ProjectsLocationsObservationJobsApiObservationsApiOperationsListCall struct } // List: ListApiOperations gets all ApiOperations for a given project and -// location and ObservationJob and ApiObservation +// location and ObservationJob and ApiObservation. // // - parent: The parent, which owns this collection of ApiOperations. Format: // projects/{project}/locations/{location}/observationJobs/{observation_job}/a @@ -2813,7 +3200,7 @@ type ProjectsLocationsObservationSourcesListCall struct { } // List: ListObservationSources gets all ObservationSources for a given project -// and location +// and location. // // - parent: The parent, which owns this collection of ObservationSources. // Format: projects/{project}/locations/{location}. diff --git a/artifactregistry/v1/artifactregistry-api.json b/artifactregistry/v1/artifactregistry-api.json index b1041804dfb..3924a36838c 100644 --- a/artifactregistry/v1/artifactregistry-api.json +++ b/artifactregistry/v1/artifactregistry-api.json @@ -2013,7 +2013,7 @@ } } }, - "revision": "20240708", + "revision": "20240717", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -3351,6 +3351,11 @@ "name": { "description": "The name of the project's settings. Always of the form: projects/{project-id}/projectSettings In update request: never set In response: always set", "type": "string" + }, + "pullPercent": { + "description": "The percentage of pull traffic to redirect from GCR to AR when using partial redirection.", + "format": "int32", + "type": "integer" } }, "type": "object" diff --git a/artifactregistry/v1/artifactregistry-gen.go b/artifactregistry/v1/artifactregistry-gen.go index d6e2fcbf9a6..30a8a0c1723 100644 --- a/artifactregistry/v1/artifactregistry-gen.go +++ b/artifactregistry/v1/artifactregistry-gen.go @@ -2269,6 +2269,9 @@ type ProjectSettings struct { // projects/{project-id}/projectSettings In update request: never set In // response: always set Name string `json:"name,omitempty"` + // PullPercent: The percentage of pull traffic to redirect from GCR to AR when + // using partial redirection. + PullPercent int64 `json:"pullPercent,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` diff --git a/artifactregistry/v1beta2/artifactregistry-api.json b/artifactregistry/v1beta2/artifactregistry-api.json index ca37e2ee075..da244946b99 100644 --- a/artifactregistry/v1beta2/artifactregistry-api.json +++ b/artifactregistry/v1beta2/artifactregistry-api.json @@ -1414,7 +1414,7 @@ } } }, - "revision": "20240603", + "revision": "20240717", "rootUrl": "https://artifactregistry.googleapis.com/", "schemas": { "AptArtifact": { @@ -2028,6 +2028,11 @@ "name": { "description": "The name of the project's settings. Always of the form: projects/{project-id}/projectSettings In update request: never set In response: always set", "type": "string" + }, + "pullPercent": { + "description": "The percentage of pull traffic to redirect from GCR to AR when using partial redirection.", + "format": "int32", + "type": "integer" } }, "type": "object" diff --git a/artifactregistry/v1beta2/artifactregistry-gen.go b/artifactregistry/v1beta2/artifactregistry-gen.go index d9ce2a2e05b..c8ec54bd7ab 100644 --- a/artifactregistry/v1beta2/artifactregistry-gen.go +++ b/artifactregistry/v1beta2/artifactregistry-gen.go @@ -1192,6 +1192,9 @@ type ProjectSettings struct { // projects/{project-id}/projectSettings In update request: never set In // response: always set Name string `json:"name,omitempty"` + // PullPercent: The percentage of pull traffic to redirect from GCR to AR when + // using partial redirection. + PullPercent int64 `json:"pullPercent,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` diff --git a/assuredworkloads/v1/assuredworkloads-api.json b/assuredworkloads/v1/assuredworkloads-api.json index 1f99a71814e..2316bc44b19 100644 --- a/assuredworkloads/v1/assuredworkloads-api.json +++ b/assuredworkloads/v1/assuredworkloads-api.json @@ -591,7 +591,7 @@ } } }, - "revision": "20240703", + "revision": "20240712", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": { @@ -719,7 +719,7 @@ "Information protection as per DoD IL5 requirements.", "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", - "KSA R5 Controls.", + "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls" ], "type": "string" @@ -1202,7 +1202,7 @@ "Information protection as per DoD IL5 requirements.", "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", - "KSA R5 Controls.", + "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls" ], "type": "string" diff --git a/assuredworkloads/v1/assuredworkloads-gen.go b/assuredworkloads/v1/assuredworkloads-gen.go index cacf3708b57..1ebbab7aefb 100644 --- a/assuredworkloads/v1/assuredworkloads-gen.go +++ b/assuredworkloads/v1/assuredworkloads-gen.go @@ -346,7 +346,8 @@ type GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata struct { // "IL5" - Information protection as per DoD IL5 requirements. // "IL2" - Information protection as per DoD IL2 requirements. // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions - // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls. + // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads + // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -880,7 +881,8 @@ type GoogleCloudAssuredworkloadsV1Workload struct { // "IL5" - Information protection as per DoD IL5 requirements. // "IL2" - Information protection as per DoD IL2 requirements. // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions - // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls. + // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads + // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. diff --git a/assuredworkloads/v1beta1/assuredworkloads-api.json b/assuredworkloads/v1beta1/assuredworkloads-api.json index f82dd7b7511..658820f7446 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-api.json +++ b/assuredworkloads/v1beta1/assuredworkloads-api.json @@ -588,7 +588,7 @@ } } }, - "revision": "20240703", + "revision": "20240712", "rootUrl": "https://assuredworkloads.googleapis.com/", "schemas": { "GoogleCloudAssuredworkloadsV1beta1AcknowledgeViolationRequest": { @@ -716,7 +716,7 @@ "Information protection as per DoD IL5 requirements.", "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", - "KSA R5 Controls.", + "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls" ], "type": "string" @@ -1197,7 +1197,7 @@ "Information protection as per DoD IL5 requirements.", "Information protection as per DoD IL2 requirements.", "Assured Workloads for Japan Regions", - "KSA R5 Controls.", + "Assured Workloads Sovereign Controls KSA", "Assured Workloads for Regional Controls" ], "type": "string" diff --git a/assuredworkloads/v1beta1/assuredworkloads-gen.go b/assuredworkloads/v1beta1/assuredworkloads-gen.go index d7abd862614..1febc627ff2 100644 --- a/assuredworkloads/v1beta1/assuredworkloads-gen.go +++ b/assuredworkloads/v1beta1/assuredworkloads-gen.go @@ -346,7 +346,8 @@ type GoogleCloudAssuredworkloadsV1beta1CreateWorkloadOperationMetadata struct { // "IL5" - Information protection as per DoD IL5 requirements. // "IL2" - Information protection as per DoD IL2 requirements. // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions - // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls. + // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads + // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls ComplianceRegime string `json:"complianceRegime,omitempty"` // CreateTime: Optional. Time when the operation was created. @@ -864,7 +865,8 @@ type GoogleCloudAssuredworkloadsV1beta1Workload struct { // "IL5" - Information protection as per DoD IL5 requirements. // "IL2" - Information protection as per DoD IL2 requirements. // "JP_REGIONS_AND_SUPPORT" - Assured Workloads for Japan Regions - // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - KSA R5 Controls. + // "KSA_REGIONS_AND_SUPPORT_WITH_SOVEREIGNTY_CONTROLS" - Assured Workloads + // Sovereign Controls KSA // "REGIONAL_CONTROLS" - Assured Workloads for Regional Controls ComplianceRegime string `json:"complianceRegime,omitempty"` // ComplianceStatus: Output only. Count of active Violations in the Workload. diff --git a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json new file mode 100644 index 00000000000..8b2b87d698b --- /dev/null +++ b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-api.json @@ -0,0 +1,3513 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/authorized-buyers-marketplace": { + "description": "See, create, edit, and delete your Authorized Buyers Marketplace entities." + } + } + } + }, + "basePath": "", + "baseUrl": "https://authorizedbuyersmarketplace.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Authorized Buyers Marketplace", + "description": "The Authorized Buyers Marketplace API lets buyers programmatically discover inventory; propose, retrieve and negotiate deals with publishers.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/", + "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": "authorizedbuyersmarketplace:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://authorizedbuyersmarketplace.mtls.googleapis.com/", + "name": "authorizedbuyersmarketplace", + "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": { + "bidders": { + "resources": { + "auctionPackages": { + "methods": { + "list": { + "description": "List the auction packages. Buyers can use the URL path \"/v1alpha/buyers/{accountId}/auctionPackages\" to list auction packages for the current buyer and its clients. Bidders can use the URL path \"/v1alpha/bidders/{accountId}/auctionPackages\" to list auction packages for the bidder, its media planners, its buyers, and all their clients.", + "flatPath": "v1alpha/bidders/{biddersId}/auctionPackages", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.bidders.auctionPackages.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Optional query string using the [Cloud API list filtering syntax](/authorized-buyers/apis/guides/list-filters). Only supported when parent is bidder. Supported columns for filtering are: * displayName * createTime * updateTime * eligibleSeatIds", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. An optional query string to sort auction packages using the [Cloud API sorting syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). If no sort order is specified, results will be returned in an arbitrary order. Only supported when parent is bidder. Supported columns for sorting are: * displayName * createTime * updateTime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. Max allowed page size is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned. ListAuctionPackagesResponse.nextPageToken", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent buyer that can access the auction package. Format: `buyers/{accountId}`. When used with a bidder account, the auction packages that the bidder, its media planners, its buyers and clients are subscribed to will be listed, in the format `bidders/{accountId}`.", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/auctionPackages", + "response": { + "$ref": "ListAuctionPackagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + }, + "finalizedDeals": { + "methods": { + "list": { + "description": "Lists finalized deals. Use the URL path \"/v1alpha/buyers/{accountId}/finalizedDeals\" to list finalized deals for the current buyer and its clients. Bidders can use the URL path \"/v1alpha/bidders/{accountId}/finalizedDeals\" to list finalized deals for the bidder, its buyers and all their clients.", + "flatPath": "v1alpha/bidders/{biddersId}/finalizedDeals", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.bidders.finalizedDeals.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional query string using the [Cloud API list filtering syntax](https://developers.google.com/authorized-buyers/apis/guides/list-filters) Supported columns for filtering are: * deal.displayName * deal.dealType * deal.createTime * deal.updateTime * deal.flightStartTime * deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "An optional query string to sort finalized deals using the [Cloud API sorting syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). If no sort order is specified, results will be returned in an arbitrary order. Supported columns for sorting are: * deal.displayName * deal.createTime * deal.updateTime * deal.flightStartTime * deal.flightEndTime * rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days * rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days * rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. If requested more than 500, the server will return 500 results per page. If unspecified, the server will pick a default page size of 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned from ListFinalizedDealsResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The buyer to list the finalized deals for, in the format: `buyers/{accountId}`. When used to list finalized deals for a bidder, its buyers and clients, in the format `bidders/{accountId}`.", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/finalizedDeals", + "response": { + "$ref": "ListFinalizedDealsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + } + } + }, + "buyers": { + "resources": { + "auctionPackages": { + "methods": { + "get": { + "description": "Gets an auction package given its name.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages/{auctionPackagesId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of auction package to get. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}`", + "location": "path", + "pattern": "^buyers/[^/]+/auctionPackages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "AuctionPackage" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "List the auction packages. Buyers can use the URL path \"/v1alpha/buyers/{accountId}/auctionPackages\" to list auction packages for the current buyer and its clients. Bidders can use the URL path \"/v1alpha/bidders/{accountId}/auctionPackages\" to list auction packages for the bidder, its media planners, its buyers, and all their clients.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Optional query string using the [Cloud API list filtering syntax](/authorized-buyers/apis/guides/list-filters). Only supported when parent is bidder. Supported columns for filtering are: * displayName * createTime * updateTime * eligibleSeatIds", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. An optional query string to sort auction packages using the [Cloud API sorting syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). If no sort order is specified, results will be returned in an arbitrary order. Only supported when parent is bidder. Supported columns for sorting are: * displayName * createTime * updateTime", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. Max allowed page size is 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned. ListAuctionPackagesResponse.nextPageToken", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent buyer that can access the auction package. Format: `buyers/{accountId}`. When used with a bidder account, the auction packages that the bidder, its media planners, its buyers and clients are subscribed to will be listed, in the format `bidders/{accountId}`.", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/auctionPackages", + "response": { + "$ref": "ListAuctionPackagesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "subscribe": { + "description": "Subscribe to the auction package for the specified buyer. Once subscribed, the bidder will receive a call out for inventory matching the auction package targeting criteria with the auction package deal ID and the specified buyer.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages/{auctionPackagesId}:subscribe", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.subscribe", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the auction package. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}`", + "location": "path", + "pattern": "^buyers/[^/]+/auctionPackages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:subscribe", + "request": { + "$ref": "SubscribeAuctionPackageRequest" + }, + "response": { + "$ref": "AuctionPackage" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "subscribeClients": { + "description": "Subscribe the specified clients of the buyer to the auction package. If a client in the list does not belong to the buyer, an error response will be returned, and all of the following clients in the list will not be subscribed. Subscribing an already subscribed client will have no effect.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages/{auctionPackagesId}:subscribeClients", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.subscribeClients", + "parameterOrder": [ + "auctionPackage" + ], + "parameters": { + "auctionPackage": { + "description": "Required. Name of the auction package. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}`", + "location": "path", + "pattern": "^buyers/[^/]+/auctionPackages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+auctionPackage}:subscribeClients", + "request": { + "$ref": "SubscribeClientsRequest" + }, + "response": { + "$ref": "AuctionPackage" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "unsubscribe": { + "description": "Unsubscribe from the auction package for the specified buyer. Once unsubscribed, the bidder will no longer receive a call out for the auction package deal ID and the specified buyer.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages/{auctionPackagesId}:unsubscribe", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribe", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the auction package. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}`", + "location": "path", + "pattern": "^buyers/[^/]+/auctionPackages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:unsubscribe", + "request": { + "$ref": "UnsubscribeAuctionPackageRequest" + }, + "response": { + "$ref": "AuctionPackage" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "unsubscribeClients": { + "description": "Unsubscribe from the auction package for the specified clients of the buyer. Unsubscribing a client that is not subscribed will have no effect.", + "flatPath": "v1alpha/buyers/{buyersId}/auctionPackages/{auctionPackagesId}:unsubscribeClients", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribeClients", + "parameterOrder": [ + "auctionPackage" + ], + "parameters": { + "auctionPackage": { + "description": "Required. Name of the auction package. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}`", + "location": "path", + "pattern": "^buyers/[^/]+/auctionPackages/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+auctionPackage}:unsubscribeClients", + "request": { + "$ref": "UnsubscribeClientsRequest" + }, + "response": { + "$ref": "AuctionPackage" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + }, + "clients": { + "methods": { + "activate": { + "description": "Activates an existing client. The state of the client will be updated to \"ACTIVE\". This method has no effect if the client is already in \"ACTIVE\" state.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}:activate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.activate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:activate", + "request": { + "$ref": "ActivateClientRequest" + }, + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "create": { + "description": "Creates a new client.", + "flatPath": "v1alpha/buyers/{buyersId}/clients", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the buyer. Format: `buyers/{accountId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/clients", + "request": { + "$ref": "Client" + }, + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "deactivate": { + "description": "Deactivates an existing client. The state of the client will be updated to \"INACTIVE\". This method has no effect if the client is already in \"INACTIVE\" state.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}:deactivate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.deactivate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:deactivate", + "request": { + "$ref": "DeactivateClientRequest" + }, + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Gets a client with a given resource name.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.clients.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{accountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists all the clients for the current buyer.", + "flatPath": "v1alpha/buyers/{buyersId}/clients", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.clients.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Query string using the [Filtering Syntax](https://developers.google.com/authorized-buyers/apis/guides/list-filters) Supported fields for filtering are: * partnerClientId Use this field to filter the clients by the partnerClientId. For example, if the partnerClientId of the client is \"1234\", the value of this field should be `partnerClientId = \"1234\"`, in order to get only the client whose partnerClientId is \"1234\" in the response.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. If left blank, a default page size of 500 will be applied.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientsResponse.nextPageToken returned from the previous call to the list method.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the buyer. Format: `buyers/{accountId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/clients", + "response": { + "$ref": "ListClientsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "patch": { + "description": "Updates an existing client.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}", + "httpMethod": "PATCH", + "id": "authorizedbuyersmarketplace.buyers.clients.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the client. Format: `buyers/{accountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Client" + }, + "response": { + "$ref": "Client" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + }, + "resources": { + "users": { + "methods": { + "activate": { + "description": "Activates an existing client user. The state of the client user will be updated from \"INACTIVE\" to \"ACTIVE\". This method has no effect if the client user is already in \"ACTIVE\" state. An error will be returned if the client user to activate is still in \"INVITED\" state.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users/{usersId}:activate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.users.activate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:activate", + "request": { + "$ref": "ActivateClientUserRequest" + }, + "response": { + "$ref": "ClientUser" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "create": { + "description": "Creates a new client user in \"INVITED\" state. An email invitation will be sent to the new user, once accepted the user will become active.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.users.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the client. Format: `buyers/{accountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/users", + "request": { + "$ref": "ClientUser" + }, + "response": { + "$ref": "ClientUser" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "deactivate": { + "description": "Deactivates an existing client user. The state of the client user will be updated from \"ACTIVE\" to \"INACTIVE\". This method has no effect if the client user is already in \"INACTIVE\" state. An error will be returned if the client user to deactivate is still in \"INVITED\" state.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users/{usersId}:deactivate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.clients.users.deactivate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:deactivate", + "request": { + "$ref": "DeactivateClientUserRequest" + }, + "response": { + "$ref": "ClientUser" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "delete": { + "description": "Deletes an existing client user. The client user will lose access to the Authorized Buyers UI. Note that if a client user is deleted, the user's access to the UI can't be restored unless a new client user is created and activated.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users/{usersId}", + "httpMethod": "DELETE", + "id": "authorizedbuyersmarketplace.buyers.clients.users.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Retrieves an existing client user.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users/{usersId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.clients.users.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+/users/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "ClientUser" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists all client users for a specified client.", + "flatPath": "v1alpha/buyers/{buyersId}/clients/{clientsId}/users", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.clients.users.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. If left blank, a default page size of 500 will be applied.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. Typically, this is the value of ListClientUsersResponse.nextPageToken returned from the previous call to the list method.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the client. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`", + "location": "path", + "pattern": "^buyers/[^/]+/clients/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/users", + "response": { + "$ref": "ListClientUsersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + } + } + }, + "dataSegments": { + "methods": { + "activate": { + "description": "Activates a data segment.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments/{dataSegmentsId}:activate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.activate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of data segment to activate. Format: `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`", + "location": "path", + "pattern": "^buyers/[^/]+/dataSegments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:activate", + "request": { + "$ref": "ActivateDataSegmentRequest" + }, + "response": { + "$ref": "DataSegment" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "create": { + "description": "Creates a data segment owned by the listed curator. The data segment will be created in the `ACTIVE` state, meaning it will be immediately available for buyers to use in preferred deals, private auction deals, and auction packages.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource where this data segment will be created. Format: `buyers/{accountId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataSegments", + "request": { + "$ref": "DataSegment" + }, + "response": { + "$ref": "DataSegment" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "deactivate": { + "description": "Deactivates a data segment.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments/{dataSegmentsId}:deactivate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.deactivate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of data segment to deactivate. Format: `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`", + "location": "path", + "pattern": "^buyers/[^/]+/dataSegments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:deactivate", + "request": { + "$ref": "DeactivateDataSegmentRequest" + }, + "response": { + "$ref": "DataSegment" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Gets a data segment given its name.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments/{dataSegmentsId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of data segment to get. Format: `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`", + "location": "path", + "pattern": "^buyers/[^/]+/dataSegments/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "DataSegment" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "List the data segments owned by a curator.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. The server may return fewer results than requested. Max allowed page size is 500. If unspecified, the server will default to 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The page token as returned. ListDataSegmentsResponse.nextPageToken", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the parent buyer that can access the data segment. Format: `buyers/{accountId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/dataSegments", + "response": { + "$ref": "ListDataSegmentsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "patch": { + "description": "Updates a data segment.", + "flatPath": "v1alpha/buyers/{buyersId}/dataSegments/{dataSegmentsId}", + "httpMethod": "PATCH", + "id": "authorizedbuyersmarketplace.buyers.dataSegments.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Identifier. The unique identifier for the data segment. Account ID corresponds to the account ID that created the segment. Format: `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`", + "location": "path", + "pattern": "^buyers/[^/]+/dataSegments/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "DataSegment" + }, + "response": { + "$ref": "DataSegment" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + }, + "finalizedDeals": { + "methods": { + "addCreative": { + "description": "Add creative to be used in the bidding process for a finalized deal. For programmatic guaranteed deals, it's recommended that you associate at least one approved creative with the deal before calling SetReadyToServe, to help reduce the number of bid responses filtered because they don't contain approved creatives. Creatives successfully added to a deal can be found in the Realtime-bidding Creatives API creative.deal_ids. This method only applies to programmatic guaranteed deals. Maximum number of 1000 creatives can be added to a finalized deal.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:addCreative", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.addCreative", + "parameterOrder": [ + "deal" + ], + "parameters": { + "deal": { + "description": "Required. Name of the finalized deal in the format of: `buyers/{accountId}/finalizedDeals/{dealId}`", + "location": "path", + "pattern": "^buyers/[^/]+/finalizedDeals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+deal}:addCreative", + "request": { + "$ref": "AddCreativeRequest" + }, + "response": { + "$ref": "FinalizedDeal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Gets a finalized deal given its name.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{accountId}/finalizedDeals/{dealId}`", + "location": "path", + "pattern": "^buyers/[^/]+/finalizedDeals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "FinalizedDeal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists finalized deals. Use the URL path \"/v1alpha/buyers/{accountId}/finalizedDeals\" to list finalized deals for the current buyer and its clients. Bidders can use the URL path \"/v1alpha/bidders/{accountId}/finalizedDeals\" to list finalized deals for the bidder, its buyers and all their clients.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional query string using the [Cloud API list filtering syntax](https://developers.google.com/authorized-buyers/apis/guides/list-filters) Supported columns for filtering are: * deal.displayName * deal.dealType * deal.createTime * deal.updateTime * deal.flightStartTime * deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "An optional query string to sort finalized deals using the [Cloud API sorting syntax](https://cloud.google.com/apis/design/design_patterns#sorting_order). If no sort order is specified, results will be returned in an arbitrary order. Supported columns for sorting are: * deal.displayName * deal.createTime * deal.updateTime * deal.flightStartTime * deal.flightEndTime * rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days * rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days * rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. If requested more than 500, the server will return 500 results per page. If unspecified, the server will pick a default page size of 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned from ListFinalizedDealsResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The buyer to list the finalized deals for, in the format: `buyers/{accountId}`. When used to list finalized deals for a bidder, its buyers and clients, in the format `bidders/{accountId}`.", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/finalizedDeals", + "response": { + "$ref": "ListFinalizedDealsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "pause": { + "description": "Pauses serving of the given finalized deal. This call only pauses the serving status, and does not affect other fields of the finalized deal. Calling this method for an already paused deal has no effect. This method only applies to programmatic guaranteed deals and preferred deals.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:pause", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.pause", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{accountId}/finalizedDeals/{dealId}`", + "location": "path", + "pattern": "^buyers/[^/]+/finalizedDeals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:pause", + "request": { + "$ref": "PauseFinalizedDealRequest" + }, + "response": { + "$ref": "FinalizedDeal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "resume": { + "description": "Resumes serving of the given finalized deal. Calling this method for an running deal has no effect. If a deal is initially paused by the seller, calling this method will not resume serving of the deal until the seller also resumes the deal. This method only applies to programmatic guaranteed deals and preferred deals.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:resume", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.resume", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `buyers/{accountId}/finalizedDeals/{dealId}`", + "location": "path", + "pattern": "^buyers/[^/]+/finalizedDeals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:resume", + "request": { + "$ref": "ResumeFinalizedDealRequest" + }, + "response": { + "$ref": "FinalizedDeal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "setReadyToServe": { + "description": "Sets the given finalized deal as ready to serve. By default, deals are set as ready to serve as soon as they're finalized. If you want to opt out of the default behavior, and manually indicate that deals are ready to serve, ask your Technical Account Manager to add you to the allowlist. If you choose to use this method, finalized deals belonging to the bidder and its child seats don't start serving until after you call `setReadyToServe`, and after the deals become active. For example, you can use this method to delay receiving bid requests until your creative is ready. This method only applies to programmatic guaranteed deals.", + "flatPath": "v1alpha/buyers/{buyersId}/finalizedDeals/{finalizedDealsId}:setReadyToServe", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.finalizedDeals.setReadyToServe", + "parameterOrder": [ + "deal" + ], + "parameters": { + "deal": { + "description": "Required. Format: `buyers/{accountId}/finalizedDeals/{dealId}`", + "location": "path", + "pattern": "^buyers/[^/]+/finalizedDeals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+deal}:setReadyToServe", + "request": { + "$ref": "SetReadyToServeRequest" + }, + "response": { + "$ref": "FinalizedDeal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + }, + "proposals": { + "methods": { + "accept": { + "description": "Accepts the proposal at the given revision number. If the revision number in the request is behind the latest from the server, an error message will be returned. This call updates the Proposal.state from `BUYER_ACCEPTANCE_REQUESTED` to `FINALIZED`; it has no side effect if the Proposal.state is already `FINALIZED` and throws exception if the Proposal.state is not either `BUYER_ACCEPTANCE_REQUESTED` or `FINALIZED`. Accepting a proposal means the buyer understands and accepts the Proposal.terms_and_conditions proposed by the seller.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}:accept", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.proposals.accept", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the proposal. Format: `buyers/{accountId}/proposals/{proposalId}`", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:accept", + "request": { + "$ref": "AcceptProposalRequest" + }, + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "addNote": { + "description": "Creates a note for this proposal and sends to the seller. This method is not supported for proposals with DealType set to 'PRIVATE_AUCTION'.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}:addNote", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.proposals.addNote", + "parameterOrder": [ + "proposal" + ], + "parameters": { + "proposal": { + "description": "Name of the proposal. Format: `buyers/{accountId}/proposals/{proposalId}`", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+proposal}:addNote", + "request": { + "$ref": "AddNoteRequest" + }, + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "cancelNegotiation": { + "description": "Cancels an ongoing negotiation on a proposal. This does not cancel or end serving for the deals if the proposal has been finalized. If the proposal has not been finalized before, calling this method will set the Proposal.state to `TERMINATED` and increment the Proposal.proposal_revision. If the proposal has been finalized before and is under renegotiation now, calling this method will reset the Proposal.state to `FINALIZED` and increment the Proposal.proposal_revision. This method does not support private auction proposals whose Proposal.deal_type is 'PRIVATE_AUCTION'.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}:cancelNegotiation", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.proposals.cancelNegotiation", + "parameterOrder": [ + "proposal" + ], + "parameters": { + "proposal": { + "description": "Name of the proposal. Format: `buyers/{accountId}/proposals/{proposalId}`", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+proposal}:cancelNegotiation", + "request": { + "$ref": "CancelNegotiationRequest" + }, + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Gets a proposal using its resource name. The proposal is returned at the latest revision.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.proposals.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the proposal. Format: `buyers/{accountId}/proposals/{proposalId}`", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists proposals. A filter expression using [Cloud API list filtering syntax](https://developers.google.com/authorized-buyers/apis/guides/list-filters) may be specified to filter the results.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.proposals.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional query string using the [Cloud API list filtering syntax](https://developers.google.com/authorized-buyers/apis/guides/list-filters) Supported columns for filtering are: * displayName * dealType * updateTime * state", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. If unspecified, the server will put a size of 500.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned from ListProposalsResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent that owns the collection of proposals Format: `buyers/{accountId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/proposals", + "response": { + "$ref": "ListProposalsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "patch": { + "description": "Updates the proposal at the given revision number. If the revision number in the request is behind the latest one kept in the server, an error message will be returned. See FieldMask for how to use FieldMask. Only fields specified in the UpdateProposalRequest.update_mask will be updated; Fields noted as 'Immutable' or 'Output only' yet specified in the UpdateProposalRequest.update_mask will be ignored and left unchanged. Updating a private auction proposal is not allowed and will result in an error.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}", + "httpMethod": "PATCH", + "id": "authorizedbuyersmarketplace.buyers.proposals.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The name of the proposal serving as a unique identifier. Format: buyers/{accountId}/proposals/{proposalId}", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Proposal" + }, + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "sendRfp": { + "description": "Sends a request for proposal (RFP) to a publisher to initiate the negotiation regarding certain inventory. In the RFP, buyers can specify the deal type, deal terms, start and end dates, targeting, and a message to the publisher. Once the RFP is sent, a proposal in `SELLER_REVIEW_REQUESTED` state will be created and returned in the response. The publisher may review your request and respond with detailed deals in the proposal.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals:sendRfp", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.proposals.sendRfp", + "parameterOrder": [ + "buyer" + ], + "parameters": { + "buyer": { + "description": "Required. The current buyer who is sending the RFP in the format: `buyers/{accountId}`.", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+buyer}/proposals:sendRfp", + "request": { + "$ref": "SendRfpRequest" + }, + "response": { + "$ref": "Proposal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + }, + "resources": { + "deals": { + "methods": { + "batchUpdate": { + "description": "Batch updates multiple deals in the same proposal.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}/deals:batchUpdate", + "httpMethod": "POST", + "id": "authorizedbuyersmarketplace.buyers.proposals.deals.batchUpdate", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the proposal containing the deals to batch update. Format: buyers/{accountId}/proposals/{proposalId}", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/deals:batchUpdate", + "request": { + "$ref": "BatchUpdateDealsRequest" + }, + "response": { + "$ref": "BatchUpdateDealsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "get": { + "description": "Gets a deal given its name. The deal is returned at its head revision.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}/deals/{dealsId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.proposals.deals.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+/deals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "Deal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists all deals in a proposal. To retrieve only the finalized revision deals regardless if a deal is being renegotiated, see the FinalizedDeals resource.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}/deals", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.proposals.deals.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. If requested more than 500, the server will return 500 results per page. If unspecified, the server will pick a default page size of 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned from ListDealsResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the proposal containing the deals to retrieve. Format: buyers/{accountId}/proposals/{proposalId}", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/deals", + "response": { + "$ref": "ListDealsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "patch": { + "description": "Updates the given deal at the buyer known revision number. If the server revision has advanced since the passed-in proposal.proposal_revision an ABORTED error message will be returned. The revision number is incremented by the server whenever the proposal or its constituent deals are updated. Note: The revision number is kept at a proposal level. The buyer of the API is expected to keep track of the revision number after the last update operation and send it in as part of the next update request. This way, if there are further changes on the server (for example, seller making new updates), then the server can detect conflicts and reject the proposed changes.", + "flatPath": "v1alpha/buyers/{buyersId}/proposals/{proposalsId}/deals/{dealsId}", + "httpMethod": "PATCH", + "id": "authorizedbuyersmarketplace.buyers.proposals.deals.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The unique identifier of the deal. Auto-generated by the server when a deal is created. Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}", + "location": "path", + "pattern": "^buyers/[^/]+/proposals/[^/]+/deals/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "Deal" + }, + "response": { + "$ref": "Deal" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + } + } + }, + "publisherProfiles": { + "methods": { + "get": { + "description": "Gets the requested publisher profile by name.", + "flatPath": "v1alpha/buyers/{buyersId}/publisherProfiles/{publisherProfilesId}", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.publisherProfiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the publisher profile. Format: `buyers/{buyerId}/publisherProfiles/{publisherProfileId}`", + "location": "path", + "pattern": "^buyers/[^/]+/publisherProfiles/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "PublisherProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + }, + "list": { + "description": "Lists publisher profiles. The returned publisher profiles aren't in any defined order. The order of the results might change. A new publisher profile can appear in any place in the list of returned results.", + "flatPath": "v1alpha/buyers/{buyersId}/publisherProfiles", + "httpMethod": "GET", + "id": "authorizedbuyersmarketplace.buyers.publisherProfiles.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional query string using the [Cloud API list filtering] (https://developers.google.com/authorized-buyers/apis/guides/list-filters) syntax.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Requested page size. The server may return fewer results than requested. If requested more than 500, the server will return 500 results per page. If unspecified, the server will pick a default page size of 100.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The page token as returned from a previous ListPublisherProfilesResponse.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent that owns the collection of publisher profiles Format: `buyers/{buyerId}`", + "location": "path", + "pattern": "^buyers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/publisherProfiles", + "response": { + "$ref": "ListPublisherProfilesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/authorized-buyers-marketplace" + ] + } + } + } + } + } + }, + "revision": "20240718", + "rootUrl": "https://authorizedbuyersmarketplace.googleapis.com/", + "schemas": { + "AcceptProposalRequest": { + "description": "Request to accept a proposal. Accepting a proposal implies acceptance of the publisher terms_and_conditions, if any.", + "id": "AcceptProposalRequest", + "properties": { + "proposalRevision": { + "description": "The last known client revision number of the proposal.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "ActivateClientRequest": { + "description": "Request message for activating a client.", + "id": "ActivateClientRequest", + "properties": {}, + "type": "object" + }, + "ActivateClientUserRequest": { + "description": "Request message for activating a client user.", + "id": "ActivateClientUserRequest", + "properties": {}, + "type": "object" + }, + "ActivateDataSegmentRequest": { + "description": "Request message for activating a data segment", + "id": "ActivateDataSegmentRequest", + "properties": {}, + "type": "object" + }, + "AdSize": { + "description": "Represents size of a single ad slot, or a creative.", + "id": "AdSize", + "properties": { + "height": { + "description": "The height of the ad slot in pixels. This field will be present only when size type is `PIXEL`.", + "format": "int64", + "type": "string" + }, + "type": { + "description": "The type of the ad slot size.", + "enum": [ + "TYPE_UNSPECIFIED", + "PIXEL", + "INTERSTITIAL", + "NATIVE", + "FLUID" + ], + "enumDescriptions": [ + "A placeholder for an undefined size type.", + "Ad slot with size specified by height and width in pixels.", + "Special size to describe an interstitial ad slot.", + "Native (mobile) ads rendered by the publisher.", + "Fluid size (responsive size) can be resized automatically with the change of outside environment." + ], + "type": "string" + }, + "width": { + "description": "The width of the ad slot in pixels. This field will be present only when size type is `PIXEL`.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "AddCreativeRequest": { + "description": "Request message for adding creative to be used in the bidding process for the finalized deal.", + "id": "AddCreativeRequest", + "properties": { + "creative": { + "description": "Name of the creative to add to the finalized deal, in the format `buyers/{buyerAccountId}/creatives/{creativeId}`. See creative.name.", + "type": "string" + } + }, + "type": "object" + }, + "AddNoteRequest": { + "description": "Request to add a note.", + "id": "AddNoteRequest", + "properties": { + "note": { + "$ref": "Note", + "description": "The note to add." + } + }, + "type": "object" + }, + "AuctionPackage": { + "description": "Defines a segment of inventory that buyer wants to buy. It's created by buyer and could be shared with multiple buyers.", + "id": "AuctionPackage", + "properties": { + "createTime": { + "description": "Output only. Time the auction package was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creator": { + "description": "Output only. The buyer that created this auction package. Format: `buyers/{buyerAccountId}`", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Output only. A description of the auction package.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "The display_name assigned to the auction package.", + "type": "string" + }, + "eligibleSeatIds": { + "description": "Output only. If set, this field contains the list of DSP specific seat ids set by media planners that are eligible to transact on this deal. The seat ID is in the calling DSP's namespace.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "name": { + "description": "Immutable. The unique identifier for the auction package. Format: `buyers/{accountId}/auctionPackages/{auctionPackageId}` The auction_package_id part of name is sent in the BidRequest to all RTB bidders and is returned as deal_id by the bidder in the BidResponse.", + "type": "string" + }, + "subscribedBuyers": { + "description": "Output only. The list of buyers that are subscribed to the AuctionPackage. This field is only populated when calling as a bidder. Format: `buyers/{buyerAccountId}`", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "subscribedClients": { + "description": "Output only. When calling as a buyer, the list of clients of the current buyer that are subscribed to the AuctionPackage. When calling as a bidder, the list of clients that are subscribed to the AuctionPackage owned by the bidder or its buyers. Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "subscribedMediaPlanners": { + "description": "Output only. The list of media planners that are subscribed to the AuctionPackage. This field is only populated when calling as a bidder.", + "items": { + "$ref": "MediaPlanner" + }, + "readOnly": true, + "type": "array" + }, + "updateTime": { + "description": "Output only. Time the auction package was last updated. This value is only increased when this auction package is updated but never when a buyer subscribed.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BatchUpdateDealsRequest": { + "description": "Request message for batch updating deals.", + "id": "BatchUpdateDealsRequest", + "properties": { + "requests": { + "description": "Required. List of request messages to update deals.", + "items": { + "$ref": "UpdateDealRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BatchUpdateDealsResponse": { + "description": "Response message for batch updating deals.", + "id": "BatchUpdateDealsResponse", + "properties": { + "deals": { + "description": "Deals updated.", + "items": { + "$ref": "Deal" + }, + "type": "array" + } + }, + "type": "object" + }, + "CancelNegotiationRequest": { + "description": "Request to cancel an ongoing negotiation.", + "id": "CancelNegotiationRequest", + "properties": {}, + "type": "object" + }, + "Client": { + "description": "A client represents an agency, a brand, or an advertiser customer of the buyer. Based on the client's role, its client users will have varying levels of restricted access to the Marketplace and certain other sections of the Authorized Buyers UI.", + "id": "Client", + "properties": { + "displayName": { + "description": "Required. Display name shown to publishers. Must be unique for clients without partnerClientId specified. Maximum length of 255 characters is allowed.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the client. Format: `buyers/{accountId}/clients/{clientAccountId}`", + "readOnly": true, + "type": "string" + }, + "partnerClientId": { + "description": "Arbitrary unique identifier provided by the buyer. This field can be used to associate a client with an identifier in the namespace of the buyer, lookup clients by that identifier and verify whether an Authorized Buyers account of the client already exists. If present, must be unique across all the clients.", + "type": "string" + }, + "role": { + "description": "Required. The role assigned to the client. Each role implies a set of permissions granted to the client.", + "enum": [ + "CLIENT_ROLE_UNSPECIFIED", + "CLIENT_DEAL_VIEWER", + "CLIENT_DEAL_NEGOTIATOR", + "CLIENT_DEAL_APPROVER" + ], + "enumDescriptions": [ + "A placeholder for an undefined client role. This value should never be specified in user input for create or update method, otherwise an error will be returned.", + "Users associated with this client role can only view proposals and deals in the Marketplace UI. They cannot negotiate or approve proposals and deals sent from publishers or send RFP to publishers.", + "Users associated with this client role can view and negotiate on the proposals and deals in the Marketplace UI sent from publishers and send RFP to publishers, but cannot approve the proposals and deals by themselves. The buyer can approve the proposals and deals on behalf of the client.", + "Users associated with this client role can view, negotiate and approve proposals and deals in the Marketplace UI and send RFP to publishers." + ], + "type": "string" + }, + "sellerVisible": { + "description": "Whether the client will be visible to sellers.", + "type": "boolean" + }, + "state": { + "description": "Output only. The state of the client.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "A placeholder for an undefined client state. Should not be used.", + "A client that is currently active and allowed to access the Authorized Buyers UI.", + "A client that is currently inactive and not allowed to access the Authorized Buyers UI." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ClientUser": { + "description": "A user of a client who has restricted access to the Marketplace and certain other sections of the Authorized Buyers UI based on the role granted to the associated client.", + "id": "ClientUser", + "properties": { + "email": { + "description": "Required. The client user's email address that has to be unique across all users for the same client.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name of the client user. Format: `buyers/{accountId}/clients/{clientAccountId}/users/{userId}`", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The state of the client user.", + "enum": [ + "STATE_UNSPECIFIED", + "INVITED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "A placeholder for an undefined user state.", + "A user who was created but hasn't accepted the invitation yet, not allowed to access the Authorized Buyers UI.", + "A user that is currently active and allowed to access the Authorized Buyers UI.", + "A user that is currently inactive and not allowed to access the Authorized Buyers UI." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Contact": { + "description": "Contains information on how a buyer or seller can be reached.", + "id": "Contact", + "properties": { + "displayName": { + "description": "The display_name of the contact.", + "type": "string" + }, + "email": { + "description": "Email address for the contact.", + "type": "string" + } + }, + "type": "object" + }, + "CreativeRequirements": { + "description": "Message captures data about the creatives in the deal.", + "id": "CreativeRequirements", + "properties": { + "creativeFormat": { + "description": "Output only. The format of the creative, only applicable for programmatic guaranteed and preferred deals.", + "enum": [ + "CREATIVE_FORMAT_UNSPECIFIED", + "DISPLAY", + "VIDEO", + "AUDIO" + ], + "enumDescriptions": [ + "A placeholder for an unspecified creative format.", + "Banner creatives such as image or HTML5 assets.", + "Video creatives that can be played in a video player.", + "Audio creatives that can play during audio content or point to a third party ad server." + ], + "readOnly": true, + "type": "string" + }, + "creativePreApprovalPolicy": { + "description": "Output only. Specifies the creative pre-approval policy.", + "enum": [ + "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED", + "SELLER_PRE_APPROVAL_REQUIRED", + "SELLER_PRE_APPROVAL_NOT_REQUIRED" + ], + "enumDescriptions": [ + "A placeholder for an undefined creative pre-approval policy.", + "The seller needs to approve each creative before it can serve.", + "The seller does not need to approve each creative before it can serve." + ], + "readOnly": true, + "type": "string" + }, + "creativeSafeFrameCompatibility": { + "description": "Output only. Specifies whether the creative is safeFrame compatible.", + "enum": [ + "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED", + "COMPATIBLE", + "INCOMPATIBLE" + ], + "enumDescriptions": [ + "A placeholder for an undefined creative safe-frame compatibility.", + "The creatives need to be compatible with the safe frame option.", + "The creatives can be incompatible with the safe frame option." + ], + "readOnly": true, + "type": "string" + }, + "maxAdDurationMs": { + "description": "Output only. The max duration of the video creative in milliseconds. only applicable for deals with video creatives.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "programmaticCreativeSource": { + "description": "Output only. Specifies the creative source for programmatic deals. PUBLISHER means creative is provided by seller and ADVERTISER means creative is provided by the buyer.", + "enum": [ + "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED", + "ADVERTISER", + "PUBLISHER" + ], + "enumDescriptions": [ + "A placeholder for an undefined programmatic creative source.", + "The advertiser provides the creatives.", + "The publisher provides the creatives to be served." + ], + "readOnly": true, + "type": "string" + }, + "skippableAdType": { + "description": "Output only. Skippable video ads allow viewers to skip ads after 5 seconds. Only applicable for deals with video creatives.", + "enum": [ + "SKIPPABLE_AD_TYPE_UNSPECIFIED", + "SKIPPABLE", + "INSTREAM_SELECT", + "NOT_SKIPPABLE", + "ANY" + ], + "enumDescriptions": [ + "A placeholder for an unspecified skippable ad type.", + "Video ad that can be skipped after 5 seconds. This value will appear in RTB bid requests as SkippableBidRequestType::REQUIRE_SKIPPABLE.", + "Video ad that can be skipped after 5 seconds, and is counted as engaged view after 30 seconds. The creative is hosted on YouTube only, and viewcount of the YouTube video increments after the engaged view. This value will appear in RTB bid requests as SkippableBidRequestType::REQUIRE_SKIPPABLE.", + "This video ad is not skippable. This value will appear in RTB bid requests as SkippableBidRequestType::BLOCK_SKIPPABLE.", + "This video ad can be skipped after 5 seconds or not-skippable. This value will appear in RTB bid requests as SkippableBidRequestType::ALLOW_SKIPPABLE." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "CriteriaTargeting": { + "description": "Generic targeting used for targeting dimensions that contains a list of included and excluded numeric IDs. This cannot be filtered using list filter syntax.", + "id": "CriteriaTargeting", + "properties": { + "excludedCriteriaIds": { + "description": "A list of numeric IDs to be excluded.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "targetedCriteriaIds": { + "description": "A list of numeric IDs to be included.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "DataSegment": { + "description": "Defines an identifier for a segment of inventory that can be targeted by curators or media planners in the deals or auction packages UI. Curation of inventory is done by curators on external platforms.", + "id": "DataSegment", + "properties": { + "cpmFee": { + "$ref": "Money", + "description": "Optional. This will be charged when other accounts use this data segment. For example, when other accounts add this data segment to a deal or auction package." + }, + "createTime": { + "description": "Output only. Time the data segment was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Identifier. The unique identifier for the data segment. Account ID corresponds to the account ID that created the segment. Format: `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`", + "type": "string" + }, + "state": { + "description": "Output only. The state of the data segment.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Default value.", + "The data segment is active.", + "The data segment is inactive." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. Time the data segment was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DayPart": { + "description": "Defines targeting for a period of time on a specific week day.", + "id": "DayPart", + "properties": { + "dayOfWeek": { + "description": "Day of week for the period.", + "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" + }, + "endTime": { + "$ref": "TimeOfDay", + "description": "Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is logically equivalent to 0, but is supported since in some cases there may need to be differentiation made between midnight on one day and midnight on the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only acceptable minute value for hour 24. Seconds and nanos are ignored." + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is logically equivalent to 0, but is supported since in some cases there may need to be differentiation made between midnight on one day and midnight on the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only acceptable minute value for hour 24. Seconds and nanos are ignored." + } + }, + "type": "object" + }, + "DayPartTargeting": { + "description": "Represents Daypart targeting.", + "id": "DayPartTargeting", + "properties": { + "dayParts": { + "description": "The targeted weekdays and times", + "items": { + "$ref": "DayPart" + }, + "type": "array" + }, + "timeZoneType": { + "description": "The time zone type of the day parts", + "enum": [ + "TIME_ZONE_TYPE_UNSPECIFIED", + "SELLER", + "USER" + ], + "enumDescriptions": [ + "Default value. This field is unused.", + "The publisher's time zone", + "The user's time zone" + ], + "type": "string" + } + }, + "type": "object" + }, + "DeactivateClientRequest": { + "description": "Request message for disabling a client.", + "id": "DeactivateClientRequest", + "properties": {}, + "type": "object" + }, + "DeactivateClientUserRequest": { + "description": "Request message for deactivating a client user.", + "id": "DeactivateClientUserRequest", + "properties": {}, + "type": "object" + }, + "DeactivateDataSegmentRequest": { + "description": "Request message for deactivating a data segment", + "id": "DeactivateDataSegmentRequest", + "properties": {}, + "type": "object" + }, + "Deal": { + "description": "A deal represents a segment of inventory for displaying ads that contains the terms and targeting information that is used for serving as well as the deal stats and status. Note: A proposal may contain multiple deals.", + "id": "Deal", + "properties": { + "billedBuyer": { + "description": "Output only. When the client field is populated, this field refers to the buyer who creates and manages the client buyer and gets billed on behalf of the client buyer; when the buyer field is populated, this field is the same value as buyer; when the deal belongs to a media planner account, this field will be empty. Format : `buyers/{buyerAccountId}`", + "readOnly": true, + "type": "string" + }, + "buyer": { + "description": "Output only. Refers to a buyer in Real-time Bidding API's Buyer resource. Format: `buyers/{buyerAccountId}`", + "readOnly": true, + "type": "string" + }, + "client": { + "description": "Output only. Refers to a Client. Format: `buyers/{buyerAccountId}/clients/{clientAccountid}`", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time of the deal creation.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creativeRequirements": { + "$ref": "CreativeRequirements", + "description": "Output only. Metadata about the creatives of this deal.", + "readOnly": true + }, + "dealType": { + "description": "Output only. Type of deal.", + "enum": [ + "DEAL_TYPE_UNSPECIFIED", + "PREFERRED_DEAL", + "PRIVATE_AUCTION", + "PROGRAMMATIC_GUARANTEED" + ], + "enumDescriptions": [ + "Default, unspecified deal type.", + "Preferred deals.", + "Private auction deals.", + "Programmatic guaranteed deals." + ], + "readOnly": true, + "type": "string" + }, + "deliveryControl": { + "$ref": "DeliveryControl", + "description": "Output only. Specifies the pacing set by the publisher.", + "readOnly": true + }, + "description": { + "description": "Output only. Free text description for the deal terms.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The name of the deal. Maximum length of 255 unicode characters is allowed. Control characters are not allowed. Buyers cannot update this field. Note: Not to be confused with name, which is a unique identifier of the deal.", + "readOnly": true, + "type": "string" + }, + "eligibleSeatIds": { + "description": "Output only. If set, this field contains the list of DSP specific seat ids set by media planners that are eligible to transact on this deal. The seat ID is in the calling DSP's namespace.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "estimatedGrossSpend": { + "$ref": "Money", + "description": "Specified by buyers in request for proposal (RFP) to notify publisher the total estimated spend for the proposal. Publishers will receive this information and send back proposed deals accordingly." + }, + "flightEndTime": { + "description": "Proposed flight end time of the deal. This will generally be stored in a granularity of a second. A value is not necessary for Private Auction deals.", + "format": "google-datetime", + "type": "string" + }, + "flightStartTime": { + "description": "Proposed flight start time of the deal. This will generally be stored in the granularity of one second since deal serving starts at seconds boundary. Any time specified with more granularity (for example, in milliseconds) will be truncated towards the start of time in seconds.", + "format": "google-datetime", + "type": "string" + }, + "mediaPlanner": { + "$ref": "MediaPlanner", + "description": "Output only. Refers to a buyer in Real-time Bidding API's Buyer resource. This field represents a media planner (For example, agency or big advertiser).", + "readOnly": true + }, + "name": { + "description": "Immutable. The unique identifier of the deal. Auto-generated by the server when a deal is created. Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}", + "type": "string" + }, + "preferredDealTerms": { + "$ref": "PreferredDealTerms", + "description": "The terms for preferred deals." + }, + "privateAuctionTerms": { + "$ref": "PrivateAuctionTerms", + "description": "The terms for private auction deals." + }, + "programmaticGuaranteedTerms": { + "$ref": "ProgrammaticGuaranteedTerms", + "description": "The terms for programmatic guaranteed deals." + }, + "proposalRevision": { + "description": "Output only. The revision number for the proposal and is the same value as proposal.proposal_revision. Each update to deal causes the proposal revision number to auto-increment. The buyer keeps track of the last revision number they know of and pass it in when making an update. If the head revision number on the server has since incremented, then an ABORTED error is returned during the update operation to let the buyer know that a subsequent update was made.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "publisherProfile": { + "description": "Immutable. Reference to the seller on the deal. Format: `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}`", + "type": "string" + }, + "sellerTimeZone": { + "$ref": "TimeZone", + "description": "Output only. Time zone of the seller used to mark the boundaries of a day for daypart targeting and CPD billing.", + "readOnly": true + }, + "targeting": { + "$ref": "MarketplaceTargeting", + "description": "Specifies the subset of inventory targeted by the deal. Can be updated by the buyer before the deal is finalized." + }, + "updateTime": { + "description": "Output only. The time when the deal was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "DealPausingInfo": { + "description": "Information related to deal pausing.", + "id": "DealPausingInfo", + "properties": { + "pauseReason": { + "description": "The reason for the pausing of the deal; empty for active deals.", + "type": "string" + }, + "pauseRole": { + "description": "The party that first paused the deal; unspecified for active deals.", + "enum": [ + "BUYER_SELLER_ROLE_UNSPECIFIED", + "BUYER", + "SELLER" + ], + "enumDescriptions": [ + "A placeholder for an undefined buyer/seller role.", + "Specifies the role as buyer.", + "Specifies the role as seller." + ], + "type": "string" + }, + "pausingConsented": { + "description": "Whether pausing is consented between buyer and seller for the deal.", + "type": "boolean" + } + }, + "type": "object" + }, + "DeliveryControl": { + "description": "Message contains details about how the deal will be paced.", + "id": "DeliveryControl", + "properties": { + "companionDeliveryType": { + "description": "Output only. Specifies roadblocking in a main companion lineitem.", + "enum": [ + "COMPANION_DELIVERY_TYPE_UNSPECIFIED", + "DELIVERY_OPTIONAL", + "DELIVERY_AT_LEAST_ONE", + "DELIVERY_ALL" + ], + "enumDescriptions": [ + "A placeholder for an unspecified companion delivery type.", + "Companions are not required to serve a creative set. The creative set can serve an inventory that has zero or more matching companions.", + "At least one companion must be served in order for the creative set to be used.", + "All companions in the set must be served in order for the creative set to be used. This can still serve to inventory that has more companions than can be filled." + ], + "readOnly": true, + "type": "string" + }, + "creativeRotationType": { + "description": "Output only. Specifies strategy to use for selecting a creative when multiple creatives of the same size are available.", + "enum": [ + "CREATIVE_ROTATION_TYPE_UNSPECIFIED", + "ROTATION_EVEN", + "ROTATION_OPTIMIZED", + "ROTATION_MANUAL", + "ROTATION_SEQUENTIAL" + ], + "enumDescriptions": [ + "Creatives are displayed roughly the same number of times over the duration of the deal.", + "Creatives are displayed roughly the same number of times over the duration of the deal.", + "Creatives are served roughly proportionally to their performance.", + "Creatives are served roughly proportionally to their weights.", + "Creatives are served exactly in sequential order, also known as Storyboarding." + ], + "readOnly": true, + "type": "string" + }, + "deliveryRateType": { + "description": "Output only. Specifies how the impression delivery will be paced.", + "enum": [ + "DELIVERY_RATE_TYPE_UNSPECIFIED", + "EVENLY", + "FRONT_LOADED", + "AS_FAST_AS_POSSIBLE" + ], + "enumDescriptions": [ + "A placeholder for an undefined delivery rate type.", + "Impressions are served uniformly over the life of the deal.", + "Impressions are served front-loaded.", + "Impressions are served as fast as possible." + ], + "readOnly": true, + "type": "string" + }, + "frequencyCap": { + "description": "Output only. Specifies any frequency caps. Cannot be filtered within ListDealsRequest.", + "items": { + "$ref": "FrequencyCap" + }, + "readOnly": true, + "type": "array" + }, + "roadblockingType": { + "description": "Output only. Specifies the roadblocking type in display creatives.", + "enum": [ + "ROADBLOCKING_TYPE_UNSPECIFIED", + "ONLY_ONE", + "ONE_OR_MORE", + "AS_MANY_AS_POSSIBLE", + "ALL_ROADBLOCK", + "CREATIVE_SET" + ], + "enumDescriptions": [ + "A placeholder for an unspecified roadblocking type.", + "Only one creative from a deal can serve per ad request. https://support.google.com/admanager/answer/177277.", + "Any number of creatives from a deal can serve together per ad request.", + "As many creatives from a deal as can fit on a page will serve. This could mean anywhere from one to all of a deal's creatives given the size constraints of ad slots on a page.", + "All or none of the creatives from a deal will serve.", + "A main/companion creative set roadblocking type." + ], + "readOnly": true, + "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", + "properties": {}, + "type": "object" + }, + "FinalizedDeal": { + "description": "A finalized deal is a snapshot of the deal when both buyer and seller accept the deal. The buyer or seller can update the deal after it's been finalized and renegotiate on the deal targeting, terms and other fields, while at the same time the finalized snapshot of the deal can still be retrieved using this API. The finalized deal contains a copy of the deal as it existed when most recently finalized, as well as fields related to deal serving such as pause/resume status, RTB metrics, and more.", + "id": "FinalizedDeal", + "properties": { + "deal": { + "$ref": "Deal", + "description": "A copy of the Deal made upon finalization. During renegotiation, this will reflect the last finalized deal before renegotiation was initiated." + }, + "dealPausingInfo": { + "$ref": "DealPausingInfo", + "description": "Information related to deal pausing for the deal." + }, + "dealServingStatus": { + "description": "Serving status of the deal.", + "enum": [ + "DEAL_SERVING_STATUS_UNSPECIFIED", + "ACTIVE", + "ENDED", + "PAUSED_BY_BUYER", + "PAUSED_BY_SELLER" + ], + "enumDescriptions": [ + "Unspecified.", + "The deal is actively serving or ready to serve when the start date is reached.", + "The deal serving has ended.", + "The deal serving is paused by buyer.", + "The deal serving is paused by seller." + ], + "type": "string" + }, + "name": { + "description": "The resource name of the finalized deal. Format: `buyers/{accountId}/finalizedDeals/{finalizedDealId}`", + "type": "string" + }, + "readyToServe": { + "description": "Whether the Programmatic Guaranteed deal is ready for serving.", + "type": "boolean" + }, + "rtbMetrics": { + "$ref": "RtbMetrics", + "description": "Real-time bidding metrics for this deal." + } + }, + "type": "object" + }, + "FirstPartyMobileApplicationTargeting": { + "description": "Represents a list of targeted and excluded mobile application IDs that publishers own. Android App ID, for example, com.google.android.apps.maps, can be found in Google Play Store URL. iOS App ID (which is a number) can be found at the end of iTunes store URL. First party mobile applications is either included or excluded.", + "id": "FirstPartyMobileApplicationTargeting", + "properties": { + "excludedAppIds": { + "description": "A list of application IDs to be excluded.", + "items": { + "type": "string" + }, + "type": "array" + }, + "targetedAppIds": { + "description": "A list of application IDs to be included.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "FrequencyCap": { + "description": "Message contains details about publisher-set frequency caps of the delivery.", + "id": "FrequencyCap", + "properties": { + "maxImpressions": { + "description": "The maximum number of impressions that can be served to a user within the specified time period.", + "format": "int32", + "type": "integer" + }, + "timeUnitType": { + "description": "The time unit. Along with num_time_units defines the amount of time over which impressions per user are counted and capped.", + "enum": [ + "TIME_UNIT_TYPE_UNSPECIFIED", + "MINUTE", + "HOUR", + "DAY", + "WEEK", + "MONTH", + "LIFETIME", + "POD", + "STREAM" + ], + "enumDescriptions": [ + "A placeholder for an undefined time unit type. This just indicates the variable with this value hasn't been initialized.", + "Minute unit.", + "Hour unit.", + "Day unit.", + "Week unit.", + "Month unit.", + "Lifecycle/Lifetime unit.", + "Pod unit.", + "Stream unit." + ], + "type": "string" + }, + "timeUnitsCount": { + "description": "The amount of time, in the units specified by time_unit_type. Defines the amount of time over which impressions per user are counted and capped.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InventorySizeTargeting": { + "description": "Represents the size of an ad unit that can be targeted on a bid request.", + "id": "InventorySizeTargeting", + "properties": { + "excludedInventorySizes": { + "description": "A list of inventory sizes to be excluded.", + "items": { + "$ref": "AdSize" + }, + "type": "array" + }, + "targetedInventorySizes": { + "description": "A list of inventory sizes to be included.", + "items": { + "$ref": "AdSize" + }, + "type": "array" + } + }, + "type": "object" + }, + "InventoryTypeTargeting": { + "description": "Targeting of the inventory types a bid request can originate from.", + "id": "InventoryTypeTargeting", + "properties": { + "inventoryTypes": { + "description": "The list of targeted inventory types for the bid request.", + "items": { + "enum": [ + "INVENTORY_TYPE_UNSPECIFIED", + "BROWSER", + "MOBILE_APP", + "VIDEO_PLAYER" + ], + "enumDescriptions": [ + "Unspecified inventory type", + "Desktop or mobile web browser excluding ads inside a video player", + "Mobile apps other than video players and web browsers", + "Instream video and audio" + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListAuctionPackagesResponse": { + "description": "Response message for listing auction packages.", + "id": "ListAuctionPackagesResponse", + "properties": { + "auctionPackages": { + "description": "The list of auction packages.", + "items": { + "$ref": "AuctionPackage" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results. Pass this value in the ListAuctionPackagesRequest.pageToken field in the subsequent call to the `ListAuctionPackages` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListClientUsersResponse": { + "description": "Response message for the list method.", + "id": "ListClientUsersResponse", + "properties": { + "clientUsers": { + "description": "The returned list of client users.", + "items": { + "$ref": "ClientUser" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results. Pass this value in the ListClientUsersRequest.pageToken field in the subsequent call to the list method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListClientsResponse": { + "description": "Response message for the list method.", + "id": "ListClientsResponse", + "properties": { + "clients": { + "description": "The returned list of clients.", + "items": { + "$ref": "Client" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results. Pass this value in the ListClientsRequest.pageToken field in the subsequent call to the list method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListDataSegmentsResponse": { + "description": "Response message for listing data segments.", + "id": "ListDataSegmentsResponse", + "properties": { + "dataSegments": { + "description": "The list of data segments.", + "items": { + "$ref": "DataSegment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results. Pass this value in the ListDataSegmentsRequest.pageToken field in the subsequent call to the `ListDataSegments` method to retrieve the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListDealsResponse": { + "description": "Response message for listing deals in a proposal.", + "id": "ListDealsResponse", + "properties": { + "deals": { + "description": "The list of deals.", + "items": { + "$ref": "Deal" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to fetch the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListFinalizedDealsResponse": { + "description": "Response message for listing finalized deals.", + "id": "ListFinalizedDealsResponse", + "properties": { + "finalizedDeals": { + "description": "The list of finalized deals.", + "items": { + "$ref": "FinalizedDeal" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to fetch the next page of results.", + "type": "string" + } + }, + "type": "object" + }, + "ListProposalsResponse": { + "description": "Response message for listing proposals.", + "id": "ListProposalsResponse", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "proposals": { + "description": "The list of proposals.", + "items": { + "$ref": "Proposal" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListPublisherProfilesResponse": { + "description": "Response message for profiles visible to the buyer.", + "id": "ListPublisherProfilesResponse", + "properties": { + "nextPageToken": { + "description": "Token to fetch the next page of results.", + "type": "string" + }, + "publisherProfiles": { + "description": "The list of matching publisher profiles.", + "items": { + "$ref": "PublisherProfile" + }, + "type": "array" + } + }, + "type": "object" + }, + "MarketplaceTargeting": { + "description": "Targeting represents different criteria that can be used to target deals or auction packages. For example, they can choose to target inventory only if the user is in the US. Multiple types of targeting are always applied as a logical AND, unless noted otherwise.", + "id": "MarketplaceTargeting", + "properties": { + "daypartTargeting": { + "$ref": "DayPartTargeting", + "description": "Daypart targeting information." + }, + "excludedSensitiveCategoryIds": { + "description": "Output only. The sensitive content category label IDs excluded. Refer to this file https://storage.googleapis.com/adx-rtb-dictionaries/content-labels.txt for category IDs.", + "items": { + "format": "int64", + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "geoTargeting": { + "$ref": "CriteriaTargeting", + "description": "Output only. Geo criteria IDs to be included/excluded.", + "readOnly": true + }, + "inventorySizeTargeting": { + "$ref": "InventorySizeTargeting", + "description": "Output only. Inventory sizes to be included/excluded.", + "readOnly": true + }, + "inventoryTypeTargeting": { + "$ref": "InventoryTypeTargeting", + "description": "Output only. Inventory type targeting information.", + "readOnly": true + }, + "placementTargeting": { + "$ref": "PlacementTargeting", + "description": "Output only. Placement targeting information, for example, URL, mobile applications.", + "readOnly": true + }, + "technologyTargeting": { + "$ref": "TechnologyTargeting", + "description": "Output only. Technology targeting information, for example, operating system, device category.", + "readOnly": true + }, + "userListTargeting": { + "$ref": "CriteriaTargeting", + "description": "Buyer user list targeting information. User lists can be uploaded using https://developers.google.com/authorized-buyers/rtb/bulk-uploader." + }, + "verticalTargeting": { + "$ref": "CriteriaTargeting", + "description": "Output only. The verticals included or excluded as defined in https://developers.google.com/authorized-buyers/rtb/downloads/publisher-verticals", + "readOnly": true + }, + "videoTargeting": { + "$ref": "VideoTargeting", + "description": "Output only. Video targeting information.", + "readOnly": true + } + }, + "type": "object" + }, + "MediaPlanner": { + "description": "Describes a single Media Planner account.", + "id": "MediaPlanner", + "properties": { + "accountId": { + "description": "Output only. Account ID of the media planner.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MobileApplicationTargeting": { + "description": "Mobile application targeting settings.", + "id": "MobileApplicationTargeting", + "properties": { + "firstPartyTargeting": { + "$ref": "FirstPartyMobileApplicationTargeting", + "description": "Publisher owned apps to be targeted or excluded by the publisher to display the ads in." + } + }, + "type": "object" + }, + "Money": { + "description": "Represents an amount of money with its currency type.", + "id": "Money", + "properties": { + "currencyCode": { + "description": "The three-letter currency code defined in ISO 4217.", + "type": "string" + }, + "nanos": { + "description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", + "format": "int32", + "type": "integer" + }, + "units": { + "description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "Note": { + "description": "A text note attached to the proposal to facilitate the communication between buyers and sellers.", + "id": "Note", + "properties": { + "createTime": { + "description": "Output only. When this note was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "creatorRole": { + "description": "Output only. The role who created the note.", + "enum": [ + "BUYER_SELLER_ROLE_UNSPECIFIED", + "BUYER", + "SELLER" + ], + "enumDescriptions": [ + "A placeholder for an undefined buyer/seller role.", + "Specifies the role as buyer.", + "Specifies the role as seller." + ], + "readOnly": true, + "type": "string" + }, + "note": { + "description": "The text of the note. Maximum length is 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "OperatingSystemTargeting": { + "description": "Represents targeting information for operating systems.", + "id": "OperatingSystemTargeting", + "properties": { + "operatingSystemCriteria": { + "$ref": "CriteriaTargeting", + "description": "IDs of operating systems to be included/excluded." + }, + "operatingSystemVersionCriteria": { + "$ref": "CriteriaTargeting", + "description": "IDs of operating system versions to be included/excluded." + } + }, + "type": "object" + }, + "PauseFinalizedDealRequest": { + "description": "Request message for pausing a finalized deal.", + "id": "PauseFinalizedDealRequest", + "properties": { + "reason": { + "description": "The reason to pause the finalized deal, will be displayed to the seller. Maximum length is 1000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "PlacementTargeting": { + "description": "Represents targeting about where the ads can appear, for example, certain sites or mobile applications. Different placement targeting types will be logically OR'ed.", + "id": "PlacementTargeting", + "properties": { + "mobileApplicationTargeting": { + "$ref": "MobileApplicationTargeting", + "description": "Mobile application targeting information in a deal. This doesn't apply to Auction Packages." + }, + "uriTargeting": { + "$ref": "UriTargeting", + "description": "URLs to be included/excluded." + } + }, + "type": "object" + }, + "PreferredDealTerms": { + "description": "Pricing terms for Preferred Deals.", + "id": "PreferredDealTerms", + "properties": { + "fixedPrice": { + "$ref": "Price", + "description": "Fixed price for the deal." + } + }, + "type": "object" + }, + "Price": { + "description": "Represents a price and a pricing type for a deal.", + "id": "Price", + "properties": { + "amount": { + "$ref": "Money", + "description": "The actual price with currency specified." + }, + "type": { + "description": "The pricing type for the deal.", + "enum": [ + "TYPE_UNSPECIFIED", + "CPM", + "CPD" + ], + "enumDescriptions": [ + "A placeholder for an undefined pricing type. If the pricing type is unspecified, CPM will be used instead.", + "Cost per thousand impressions.", + "Cost per day." + ], + "type": "string" + } + }, + "type": "object" + }, + "PrivateAuctionTerms": { + "description": "Pricing terms for Private Auctions.", + "id": "PrivateAuctionTerms", + "properties": { + "floorPrice": { + "$ref": "Price", + "description": "The minimum price buyer has to bid to compete in the private auction." + }, + "openAuctionAllowed": { + "description": "Output only. True if open auction buyers are allowed to compete with invited buyers in this private auction.", + "readOnly": true, + "type": "boolean" + } + }, + "type": "object" + }, + "PrivateData": { + "description": "Buyers are allowed to store certain types of private data in a proposal or deal.", + "id": "PrivateData", + "properties": { + "referenceId": { + "description": "A buyer specified reference ID. This can be queried in the list operations (max-length: 1024 unicode code units).", + "type": "string" + } + }, + "type": "object" + }, + "ProgrammaticGuaranteedTerms": { + "description": "Pricing terms for Programmatic Guaranteed Deals.", + "id": "ProgrammaticGuaranteedTerms", + "properties": { + "fixedPrice": { + "$ref": "Price", + "description": "Fixed price for the deal." + }, + "guaranteedLooks": { + "description": "Count of guaranteed looks. For CPD deals, buyer changes to guaranteed_looks will be ignored.", + "format": "int64", + "type": "string" + }, + "impressionCap": { + "description": "The lifetime impression cap for CPM Sponsorship deals. Deal will stop serving when cap is reached.", + "format": "int64", + "type": "string" + }, + "minimumDailyLooks": { + "description": "Daily minimum looks for CPD deal types. For CPD deals, buyer should negotiate on this field instead of guaranteed_looks.", + "format": "int64", + "type": "string" + }, + "percentShareOfVoice": { + "description": "For sponsorship deals, this is the percentage of the seller's eligible impressions that the deal will serve until the cap is reached. Valid value is within range 0~100.", + "format": "int64", + "type": "string" + }, + "reservationType": { + "description": "The reservation type for a Programmatic Guaranteed deal. This indicates whether the number of impressions is fixed, or a percent of available impressions. If not specified, the default reservation type is STANDARD.", + "enum": [ + "RESERVATION_TYPE_UNSPECIFIED", + "STANDARD", + "SPONSORSHIP" + ], + "enumDescriptions": [ + "An unspecified reservation type.", + "Non-sponsorship deal.", + "Sponsorship deals don't have impression goal (guaranteed_looks) and they are served based on the flight dates. For CPM Sponsorship deals, impression_cap is the lifetime impression limit." + ], + "type": "string" + } + }, + "type": "object" + }, + "Proposal": { + "description": "Represents a proposal in the Marketplace. A proposal is the unit of negotiation between a seller and a buyer.", + "id": "Proposal", + "properties": { + "billedBuyer": { + "description": "Output only. When the client field is populated, this field refers to the buyer who creates and manages the client buyer and gets billed on behalf of the client buyer; when the buyer field is populated, this field is the same value as buyer. Format : `buyers/{buyerAccountId}`", + "readOnly": true, + "type": "string" + }, + "buyer": { + "description": "Output only. Refers to a buyer in The Realtime-bidding API. Format: `buyers/{buyerAccountId}`", + "readOnly": true, + "type": "string" + }, + "buyerContacts": { + "description": "Contact information for the buyer.", + "items": { + "$ref": "Contact" + }, + "type": "array" + }, + "buyerPrivateData": { + "$ref": "PrivateData", + "description": "Buyer private data (hidden from seller)." + }, + "client": { + "description": "Output only. Refers to a Client. Format: `buyers/{buyerAccountId}/clients/{clientAccountid}`", + "readOnly": true, + "type": "string" + }, + "dealType": { + "description": "Output only. Type of deal the proposal contains.", + "enum": [ + "DEAL_TYPE_UNSPECIFIED", + "PREFERRED_DEAL", + "PRIVATE_AUCTION", + "PROGRAMMATIC_GUARANTEED" + ], + "enumDescriptions": [ + "Default, unspecified deal type.", + "Preferred deals.", + "Private auction deals.", + "Programmatic guaranteed deals." + ], + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Output only. The descriptive name for the proposal. Maximum length of 255 unicode characters is allowed. Control characters are not allowed. Buyers cannot update this field. Note: Not to be confused with name, which is a unique identifier of the proposal.", + "readOnly": true, + "type": "string" + }, + "isRenegotiating": { + "description": "Output only. True if the proposal was previously finalized and is now being renegotiated.", + "readOnly": true, + "type": "boolean" + }, + "lastUpdaterOrCommentorRole": { + "description": "Output only. The role of the last user that either updated the proposal or left a comment.", + "enum": [ + "BUYER_SELLER_ROLE_UNSPECIFIED", + "BUYER", + "SELLER" + ], + "enumDescriptions": [ + "A placeholder for an undefined buyer/seller role.", + "Specifies the role as buyer.", + "Specifies the role as seller." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The name of the proposal serving as a unique identifier. Format: buyers/{accountId}/proposals/{proposalId}", + "type": "string" + }, + "notes": { + "description": "A list of notes from the buyer and the seller attached to this proposal.", + "items": { + "$ref": "Note" + }, + "type": "array" + }, + "originatorRole": { + "description": "Output only. Indicates whether the buyer/seller created the proposal.", + "enum": [ + "BUYER_SELLER_ROLE_UNSPECIFIED", + "BUYER", + "SELLER" + ], + "enumDescriptions": [ + "A placeholder for an undefined buyer/seller role.", + "Specifies the role as buyer.", + "Specifies the role as seller." + ], + "readOnly": true, + "type": "string" + }, + "pausingConsented": { + "description": "Whether pausing is allowed for the proposal. This is a negotiable term between buyers and publishers.", + "type": "boolean" + }, + "proposalRevision": { + "description": "Output only. The revision number for the proposal. Each update to the proposal or deal causes the proposal revision number to auto-increment. The buyer keeps track of the last revision number they know of and pass it in when making an update. If the head revision number on the server has since incremented, then an ABORTED error is returned during the update operation to let the buyer know that a subsequent update was made.", + "format": "int64", + "readOnly": true, + "type": "string" + }, + "publisherProfile": { + "description": "Immutable. Reference to the seller on the proposal. Format: `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` Note: This field may be set only when creating the resource. Modifying this field while updating the resource will result in an error.", + "type": "string" + }, + "sellerContacts": { + "description": "Output only. Contact information for the seller.", + "items": { + "$ref": "Contact" + }, + "readOnly": true, + "type": "array" + }, + "state": { + "description": "Output only. Indicates the state of the proposal.", + "enum": [ + "STATE_UNSPECIFIED", + "BUYER_REVIEW_REQUESTED", + "SELLER_REVIEW_REQUESTED", + "BUYER_ACCEPTANCE_REQUESTED", + "FINALIZED", + "TERMINATED" + ], + "enumDescriptions": [ + "Unspecified proposal state", + "When a proposal is waiting for buyer to review.", + "When the proposal is waiting for the seller to review.", + "When the seller accepted the proposal and sent it to the buyer for review.", + "When both buyer and seller has accepted the proposal", + "When either buyer or seller has cancelled the proposal" + ], + "readOnly": true, + "type": "string" + }, + "termsAndConditions": { + "description": "Output only. The terms and conditions associated with this proposal. Accepting a proposal implies acceptance of this field. This is created by the seller, the buyer can only view it.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the proposal was last revised.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "PublisherProfile": { + "description": "The values in the publisher profile are supplied by the publisher. All fields are not filterable unless stated otherwise.", + "id": "PublisherProfile", + "properties": { + "audienceDescription": { + "description": "Description on the publisher's audience.", + "type": "string" + }, + "directDealsContact": { + "description": "Contact information for direct reservation deals. This is free text entered by the publisher and may include information like names, phone numbers and email addresses.", + "type": "string" + }, + "displayName": { + "description": "Display name of the publisher profile. Can be used to filter the response of the publisherProfiles.list method.", + "type": "string" + }, + "domains": { + "description": "The list of domains represented in this publisher profile. Empty if this is a parent profile. These are top private domains, meaning that these will not contain a string like \"photos.google.co.uk/123\", but will instead contain \"google.co.uk\". Can be used to filter the response of the publisherProfiles.list method.", + "items": { + "type": "string" + }, + "type": "array" + }, + "isParent": { + "description": "Indicates if this profile is the parent profile of the seller. A parent profile represents all the inventory from the seller, as opposed to child profile that is created to brand a portion of inventory. One seller has only one parent publisher profile, and can have multiple child profiles. See https://support.google.com/admanager/answer/6035806 for details. Can be used to filter the response of the publisherProfiles.list method by setting the filter to \"is_parent: true\".", + "type": "boolean" + }, + "logoUrl": { + "description": "A Google public URL to the logo for this publisher profile. The logo is stored as a PNG, JPG, or GIF image.", + "type": "string" + }, + "mediaKitUrl": { + "description": "URL to additional marketing and sales materials.", + "type": "string" + }, + "mobileApps": { + "description": "The list of apps represented in this publisher profile. Empty if this is a parent profile.", + "items": { + "$ref": "PublisherProfileMobileApplication" + }, + "type": "array" + }, + "name": { + "description": "Name of the publisher profile. Format: `buyers/{buyer}/publisherProfiles/{publisher_profile}`", + "type": "string" + }, + "overview": { + "description": "Overview of the publisher.", + "type": "string" + }, + "pitchStatement": { + "description": "Statement explaining what's unique about publisher's business, and why buyers should partner with the publisher.", + "type": "string" + }, + "programmaticDealsContact": { + "description": "Contact information for programmatic deals. This is free text entered by the publisher and may include information like names, phone numbers and email addresses.", + "type": "string" + }, + "publisherCode": { + "description": "A unique identifying code for the seller. This value is the same for all of the seller's parent and child publisher profiles. Can be used to filter the response of the publisherProfiles.list method.", + "type": "string" + }, + "samplePageUrl": { + "description": "URL to a sample content page.", + "type": "string" + }, + "topHeadlines": { + "description": "Up to three key metrics and rankings. For example, \"#1 Mobile News Site for 20 Straight Months\".", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "PublisherProfileMobileApplication": { + "description": "A mobile application that contains a external app ID, name, and app store.", + "id": "PublisherProfileMobileApplication", + "properties": { + "appStore": { + "description": "The app store the app belongs to. Can be used to filter the response of the publisherProfiles.list method.", + "enum": [ + "APP_STORE_TYPE_UNSPECIFIED", + "APPLE_ITUNES", + "GOOGLE_PLAY", + "ROKU", + "AMAZON_FIRE_TV", + "PLAYSTATION", + "XBOX", + "SAMSUNG_TV", + "AMAZON", + "OPPO", + "SAMSUNG", + "VIVO", + "XIAOMI", + "LG_TV" + ], + "enumDescriptions": [ + "A placeholder for an unknown app store.", + "Apple iTunes", + "Google Play", + "Roku", + "Amazon Fire TV", + "PlayStation", + "Xbox", + "Samsung TV", + "Amazon Appstore", + "OPPO App Market", + "Samsung Galaxy Store", + "VIVO App Store", + "Xiaomi GetApps", + "LG TV" + ], + "type": "string" + }, + "externalAppId": { + "description": "The external ID for the app from its app store. Can be used to filter the response of the publisherProfiles.list method.", + "type": "string" + }, + "name": { + "description": "The name of the app.", + "type": "string" + } + }, + "type": "object" + }, + "ResumeFinalizedDealRequest": { + "description": "Request message for resuming a finalized deal.", + "id": "ResumeFinalizedDealRequest", + "properties": {}, + "type": "object" + }, + "RtbMetrics": { + "description": "Real-time bidding metrics. For what each metric means refer to [Report metrics](https://support.google.com/adxbuyer/answer/6115195#report-metrics)", + "id": "RtbMetrics", + "properties": { + "adImpressions7Days": { + "description": "Ad impressions in last 7 days.", + "format": "int64", + "type": "string" + }, + "bidRate7Days": { + "description": "Bid rate in last 7 days, calculated by (bids / bid requests).", + "format": "double", + "type": "number" + }, + "bidRequests7Days": { + "description": "Bid requests in last 7 days.", + "format": "int64", + "type": "string" + }, + "bids7Days": { + "description": "Bids in last 7 days.", + "format": "int64", + "type": "string" + }, + "filteredBidRate7Days": { + "description": "Filtered bid rate in last 7 days, calculated by (filtered bids / bids).", + "format": "double", + "type": "number" + }, + "mustBidRateCurrentMonth": { + "description": "Must bid rate for current month.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "SendRfpRequest": { + "description": "Request to send an RFP. All fields in this request are proposed to publisher and subject to changes by publisher during later negotiation.", + "id": "SendRfpRequest", + "properties": { + "buyerContacts": { + "description": "Contact information for the buyer.", + "items": { + "$ref": "Contact" + }, + "type": "array" + }, + "client": { + "description": "If the current buyer is sending the RFP on behalf of its client, use this field to specify the name of the client in the format: `buyers/{accountId}/clients/{clientAccountid}`.", + "type": "string" + }, + "displayName": { + "description": "Required. The display name of the proposal being created by this RFP.", + "type": "string" + }, + "estimatedGrossSpend": { + "$ref": "Money", + "description": "Specified by buyers in request for proposal (RFP) to notify publisher the total estimated spend for the proposal. Publishers will receive this information and send back proposed deals accordingly." + }, + "flightEndTime": { + "description": "Required. Proposed flight end time of the RFP. A timestamp in RFC3339 UTC \"Zulu\" format. Note that the specified value will be truncated to a granularity of one second.", + "format": "google-datetime", + "type": "string" + }, + "flightStartTime": { + "description": "Required. Proposed flight start time of the RFP. A timestamp in RFC3339 UTC \"Zulu\" format. Note that the specified value will be truncated to a granularity of one second.", + "format": "google-datetime", + "type": "string" + }, + "geoTargeting": { + "$ref": "CriteriaTargeting", + "description": "Geo criteria IDs to be targeted. Refer to Geo tables." + }, + "inventorySizeTargeting": { + "$ref": "InventorySizeTargeting", + "description": "Inventory sizes to be targeted." + }, + "note": { + "description": "A message that is sent to the publisher. Maximum length is 1024 characters.", + "type": "string" + }, + "preferredDealTerms": { + "$ref": "PreferredDealTerms", + "description": "The terms for preferred deals." + }, + "programmaticGuaranteedTerms": { + "$ref": "ProgrammaticGuaranteedTerms", + "description": "The terms for programmatic guaranteed deals." + }, + "publisherProfile": { + "description": "Required. The profile of the publisher who will receive this RFP in the format: `buyers/{accountId}/publisherProfiles/{publisherProfileId}`.", + "type": "string" + } + }, + "type": "object" + }, + "SetReadyToServeRequest": { + "description": "Request message for setting ready to serve for a finalized deal.", + "id": "SetReadyToServeRequest", + "properties": {}, + "type": "object" + }, + "SubscribeAuctionPackageRequest": { + "description": "Request message for SubscribeAuctionPackage.", + "id": "SubscribeAuctionPackageRequest", + "properties": {}, + "type": "object" + }, + "SubscribeClientsRequest": { + "description": "Request message for SubscribeAuctionPackageClients.", + "id": "SubscribeClientsRequest", + "properties": { + "clients": { + "description": "Optional. A list of client buyers to subscribe to the auction package, with client buyer in the format `buyers/{accountId}/clients/{clientAccountId}`. The current buyer will be subscribed to the auction package regardless of the list contents if not already.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "TechnologyTargeting": { + "description": "Represents targeting about various types of technology.", + "id": "TechnologyTargeting", + "properties": { + "deviceCapabilityTargeting": { + "$ref": "CriteriaTargeting", + "description": "IDs of device capabilities to be included/excluded." + }, + "deviceCategoryTargeting": { + "$ref": "CriteriaTargeting", + "description": "IDs of device categories to be included/excluded." + }, + "operatingSystemTargeting": { + "$ref": "OperatingSystemTargeting", + "description": "Operating system related targeting information." + } + }, + "type": "object" + }, + "TimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", + "id": "TimeOfDay", + "properties": { + "hours": { + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", + "format": "int32", + "type": "integer" + }, + "minutes": { + "description": "Minutes of hour of day. Must be from 0 to 59.", + "format": "int32", + "type": "integer" + }, + "nanos": { + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "format": "int32", + "type": "integer" + }, + "seconds": { + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TimeZone": { + "description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", + "id": "TimeZone", + "properties": { + "id": { + "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "type": "string" + }, + "version": { + "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "type": "string" + } + }, + "type": "object" + }, + "UnsubscribeAuctionPackageRequest": { + "description": "Request message for UnsubscribeAuctionPackage.", + "id": "UnsubscribeAuctionPackageRequest", + "properties": {}, + "type": "object" + }, + "UnsubscribeClientsRequest": { + "description": "Request message for UnsubscribeAuctionPackage.", + "id": "UnsubscribeClientsRequest", + "properties": { + "clients": { + "description": "Optional. A list of client buyers to unsubscribe from the auction package, with client buyer in the format `buyers/{accountId}/clients/{clientAccountId}`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "UpdateDealRequest": { + "description": "Request message for updating the deal at the given revision number.", + "id": "UpdateDealRequest", + "properties": { + "deal": { + "$ref": "Deal", + "description": "Required. The deal to update. The deal's `name` field is used to identify the deal to be updated. Note: proposal_revision will have to be provided within the resource or else an error will be thrown. Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}" + }, + "updateMask": { + "description": "List of fields to be updated. If empty or unspecified, the service will update all fields populated in the update request excluding the output only fields and primitive fields with default value. Note that explicit field mask is required in order to reset a primitive field back to its default value, for example, false for boolean fields, 0 for integer fields. A special field mask consisting of a single path \"*\" can be used to indicate full replacement(the equivalent of PUT method), updatable fields unset or unspecified in the input will be cleared or set to default value. Output only fields will be ignored regardless of the value of updateMask.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "UriTargeting": { + "description": "Represents a list of targeted and excluded URLs (for example, google.com). For Private Auction Deals, URLs are either included or excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't apply.", + "id": "UriTargeting", + "properties": { + "excludedUris": { + "description": "A list of URLs to be excluded.", + "items": { + "type": "string" + }, + "type": "array" + }, + "targetedUris": { + "description": "A list of URLs to be included.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "VideoTargeting": { + "description": "Represents targeting information about video.", + "id": "VideoTargeting", + "properties": { + "excludedPositionTypes": { + "description": "A list of video positions to be excluded. When this field is populated, the targeted_position_types field must be empty.", + "items": { + "enum": [ + "POSITION_TYPE_UNSPECIFIED", + "PREROLL", + "MIDROLL", + "POSTROLL" + ], + "enumDescriptions": [ + "A placeholder for an undefined video position.", + "Ad is played before the video.", + "Ad is played during the video.", + "Ad is played after the video." + ], + "type": "string" + }, + "type": "array" + }, + "targetedPositionTypes": { + "description": "A list of video positions to be included. When this field is populated, the excluded_position_types field must be empty.", + "items": { + "enum": [ + "POSITION_TYPE_UNSPECIFIED", + "PREROLL", + "MIDROLL", + "POSTROLL" + ], + "enumDescriptions": [ + "A placeholder for an undefined video position.", + "Ad is played before the video.", + "Ad is played during the video.", + "Ad is played after the video." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Authorized Buyers Marketplace API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go new file mode 100644 index 00000000000..0bb0e4af64d --- /dev/null +++ b/authorizedbuyersmarketplace/v1alpha/authorizedbuyersmarketplace-gen.go @@ -0,0 +1,7892 @@ +// 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 authorizedbuyersmarketplace provides access to the Authorized Buyers Marketplace API. +// +// For product documentation, see: https://developers.google.com/authorized-buyers/apis/marketplace/reference/rest/ +// +// # 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/authorizedbuyersmarketplace/v1alpha" +// ... +// ctx := context.Background() +// authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.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]: +// +// authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.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, ...) +// authorizedbuyersmarketplaceService, err := authorizedbuyersmarketplace.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package authorizedbuyersmarketplace // import "google.golang.org/api/authorizedbuyersmarketplace/v1alpha" + +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 = "authorizedbuyersmarketplace:v1alpha" +const apiName = "authorizedbuyersmarketplace" +const apiVersion = "v1alpha" +const basePath = "https://authorizedbuyersmarketplace.googleapis.com/" +const basePathTemplate = "https://authorizedbuyersmarketplace.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://authorizedbuyersmarketplace.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, create, edit, and delete your Authorized Buyers Marketplace entities. + AuthorizedBuyersMarketplaceScope = "https://www.googleapis.com/auth/authorized-buyers-marketplace" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/authorized-buyers-marketplace", + ) + // 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.Bidders = NewBiddersService(s) + s.Buyers = NewBuyersService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Bidders *BiddersService + + Buyers *BuyersService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewBiddersService(s *Service) *BiddersService { + rs := &BiddersService{s: s} + rs.AuctionPackages = NewBiddersAuctionPackagesService(s) + rs.FinalizedDeals = NewBiddersFinalizedDealsService(s) + return rs +} + +type BiddersService struct { + s *Service + + AuctionPackages *BiddersAuctionPackagesService + + FinalizedDeals *BiddersFinalizedDealsService +} + +func NewBiddersAuctionPackagesService(s *Service) *BiddersAuctionPackagesService { + rs := &BiddersAuctionPackagesService{s: s} + return rs +} + +type BiddersAuctionPackagesService struct { + s *Service +} + +func NewBiddersFinalizedDealsService(s *Service) *BiddersFinalizedDealsService { + rs := &BiddersFinalizedDealsService{s: s} + return rs +} + +type BiddersFinalizedDealsService struct { + s *Service +} + +func NewBuyersService(s *Service) *BuyersService { + rs := &BuyersService{s: s} + rs.AuctionPackages = NewBuyersAuctionPackagesService(s) + rs.Clients = NewBuyersClientsService(s) + rs.DataSegments = NewBuyersDataSegmentsService(s) + rs.FinalizedDeals = NewBuyersFinalizedDealsService(s) + rs.Proposals = NewBuyersProposalsService(s) + rs.PublisherProfiles = NewBuyersPublisherProfilesService(s) + return rs +} + +type BuyersService struct { + s *Service + + AuctionPackages *BuyersAuctionPackagesService + + Clients *BuyersClientsService + + DataSegments *BuyersDataSegmentsService + + FinalizedDeals *BuyersFinalizedDealsService + + Proposals *BuyersProposalsService + + PublisherProfiles *BuyersPublisherProfilesService +} + +func NewBuyersAuctionPackagesService(s *Service) *BuyersAuctionPackagesService { + rs := &BuyersAuctionPackagesService{s: s} + return rs +} + +type BuyersAuctionPackagesService struct { + s *Service +} + +func NewBuyersClientsService(s *Service) *BuyersClientsService { + rs := &BuyersClientsService{s: s} + rs.Users = NewBuyersClientsUsersService(s) + return rs +} + +type BuyersClientsService struct { + s *Service + + Users *BuyersClientsUsersService +} + +func NewBuyersClientsUsersService(s *Service) *BuyersClientsUsersService { + rs := &BuyersClientsUsersService{s: s} + return rs +} + +type BuyersClientsUsersService struct { + s *Service +} + +func NewBuyersDataSegmentsService(s *Service) *BuyersDataSegmentsService { + rs := &BuyersDataSegmentsService{s: s} + return rs +} + +type BuyersDataSegmentsService struct { + s *Service +} + +func NewBuyersFinalizedDealsService(s *Service) *BuyersFinalizedDealsService { + rs := &BuyersFinalizedDealsService{s: s} + return rs +} + +type BuyersFinalizedDealsService struct { + s *Service +} + +func NewBuyersProposalsService(s *Service) *BuyersProposalsService { + rs := &BuyersProposalsService{s: s} + rs.Deals = NewBuyersProposalsDealsService(s) + return rs +} + +type BuyersProposalsService struct { + s *Service + + Deals *BuyersProposalsDealsService +} + +func NewBuyersProposalsDealsService(s *Service) *BuyersProposalsDealsService { + rs := &BuyersProposalsDealsService{s: s} + return rs +} + +type BuyersProposalsDealsService struct { + s *Service +} + +func NewBuyersPublisherProfilesService(s *Service) *BuyersPublisherProfilesService { + rs := &BuyersPublisherProfilesService{s: s} + return rs +} + +type BuyersPublisherProfilesService struct { + s *Service +} + +// AcceptProposalRequest: Request to accept a proposal. Accepting a proposal +// implies acceptance of the publisher terms_and_conditions, if any. +type AcceptProposalRequest struct { + // ProposalRevision: The last known client revision number of the proposal. + ProposalRevision int64 `json:"proposalRevision,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ProposalRevision") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProposalRevision") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AcceptProposalRequest) MarshalJSON() ([]byte, error) { + type NoMethod AcceptProposalRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ActivateClientRequest: Request message for activating a client. +type ActivateClientRequest struct { +} + +// ActivateClientUserRequest: Request message for activating a client user. +type ActivateClientUserRequest struct { +} + +// ActivateDataSegmentRequest: Request message for activating a data segment +type ActivateDataSegmentRequest struct { +} + +// AdSize: Represents size of a single ad slot, or a creative. +type AdSize struct { + // Height: The height of the ad slot in pixels. This field will be present only + // when size type is `PIXEL`. + Height int64 `json:"height,omitempty,string"` + // Type: The type of the ad slot size. + // + // Possible values: + // "TYPE_UNSPECIFIED" - A placeholder for an undefined size type. + // "PIXEL" - Ad slot with size specified by height and width in pixels. + // "INTERSTITIAL" - Special size to describe an interstitial ad slot. + // "NATIVE" - Native (mobile) ads rendered by the publisher. + // "FLUID" - Fluid size (responsive size) can be resized automatically with + // the change of outside environment. + Type string `json:"type,omitempty"` + // Width: The width of the ad slot in pixels. This field will be present only + // when size type is `PIXEL`. + Width int64 `json:"width,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "Height") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Height") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AdSize) MarshalJSON() ([]byte, error) { + type NoMethod AdSize + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AddCreativeRequest: Request message for adding creative to be used in the +// bidding process for the finalized deal. +type AddCreativeRequest struct { + // Creative: Name of the creative to add to the finalized deal, in the format + // `buyers/{buyerAccountId}/creatives/{creativeId}`. See creative.name. + Creative string `json:"creative,omitempty"` + // ForceSendFields is a list of field names (e.g. "Creative") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Creative") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AddCreativeRequest) MarshalJSON() ([]byte, error) { + type NoMethod AddCreativeRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AddNoteRequest: Request to add a note. +type AddNoteRequest struct { + // Note: The note to add. + Note *Note `json:"note,omitempty"` + // ForceSendFields is a list of field names (e.g. "Note") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Note") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AddNoteRequest) MarshalJSON() ([]byte, error) { + type NoMethod AddNoteRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// AuctionPackage: Defines a segment of inventory that buyer wants to buy. It's +// created by buyer and could be shared with multiple buyers. +type AuctionPackage struct { + // CreateTime: Output only. Time the auction package was created. + CreateTime string `json:"createTime,omitempty"` + // Creator: Output only. The buyer that created this auction package. Format: + // `buyers/{buyerAccountId}` + Creator string `json:"creator,omitempty"` + // Description: Output only. A description of the auction package. + Description string `json:"description,omitempty"` + // DisplayName: The display_name assigned to the auction package. + DisplayName string `json:"displayName,omitempty"` + // EligibleSeatIds: Output only. If set, this field contains the list of DSP + // specific seat ids set by media planners that are eligible to transact on + // this deal. The seat ID is in the calling DSP's namespace. + EligibleSeatIds []string `json:"eligibleSeatIds,omitempty"` + // Name: Immutable. The unique identifier for the auction package. Format: + // `buyers/{accountId}/auctionPackages/{auctionPackageId}` The + // auction_package_id part of name is sent in the BidRequest to all RTB bidders + // and is returned as deal_id by the bidder in the BidResponse. + Name string `json:"name,omitempty"` + // SubscribedBuyers: Output only. The list of buyers that are subscribed to the + // AuctionPackage. This field is only populated when calling as a bidder. + // Format: `buyers/{buyerAccountId}` + SubscribedBuyers []string `json:"subscribedBuyers,omitempty"` + // SubscribedClients: Output only. When calling as a buyer, the list of clients + // of the current buyer that are subscribed to the AuctionPackage. When calling + // as a bidder, the list of clients that are subscribed to the AuctionPackage + // owned by the bidder or its buyers. Format: + // `buyers/{buyerAccountId}/clients/{clientAccountId}` + SubscribedClients []string `json:"subscribedClients,omitempty"` + // SubscribedMediaPlanners: Output only. The list of media planners that are + // subscribed to the AuctionPackage. This field is only populated when calling + // as a bidder. + SubscribedMediaPlanners []*MediaPlanner `json:"subscribedMediaPlanners,omitempty"` + // UpdateTime: Output only. Time the auction package was last updated. This + // value is only increased when this auction package is updated but never when + // a buyer subscribed. + 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 AuctionPackage) MarshalJSON() ([]byte, error) { + type NoMethod AuctionPackage + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BatchUpdateDealsRequest: Request message for batch updating deals. +type BatchUpdateDealsRequest struct { + // Requests: Required. List of request messages to update deals. + Requests []*UpdateDealRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Requests") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BatchUpdateDealsRequest) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateDealsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BatchUpdateDealsResponse: Response message for batch updating deals. +type BatchUpdateDealsResponse struct { + // Deals: Deals updated. + Deals []*Deal `json:"deals,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Deals") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Deals") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BatchUpdateDealsResponse) MarshalJSON() ([]byte, error) { + type NoMethod BatchUpdateDealsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CancelNegotiationRequest: Request to cancel an ongoing negotiation. +type CancelNegotiationRequest struct { +} + +// Client: A client represents an agency, a brand, or an advertiser customer of +// the buyer. Based on the client's role, its client users will have varying +// levels of restricted access to the Marketplace and certain other sections of +// the Authorized Buyers UI. +type Client struct { + // DisplayName: Required. Display name shown to publishers. Must be unique for + // clients without partnerClientId specified. Maximum length of 255 characters + // is allowed. + DisplayName string `json:"displayName,omitempty"` + // Name: Output only. The resource name of the client. Format: + // `buyers/{accountId}/clients/{clientAccountId}` + Name string `json:"name,omitempty"` + // PartnerClientId: Arbitrary unique identifier provided by the buyer. This + // field can be used to associate a client with an identifier in the namespace + // of the buyer, lookup clients by that identifier and verify whether an + // Authorized Buyers account of the client already exists. If present, must be + // unique across all the clients. + PartnerClientId string `json:"partnerClientId,omitempty"` + // Role: Required. The role assigned to the client. Each role implies a set of + // permissions granted to the client. + // + // Possible values: + // "CLIENT_ROLE_UNSPECIFIED" - A placeholder for an undefined client role. + // This value should never be specified in user input for create or update + // method, otherwise an error will be returned. + // "CLIENT_DEAL_VIEWER" - Users associated with this client role can only + // view proposals and deals in the Marketplace UI. They cannot negotiate or + // approve proposals and deals sent from publishers or send RFP to publishers. + // "CLIENT_DEAL_NEGOTIATOR" - Users associated with this client role can view + // and negotiate on the proposals and deals in the Marketplace UI sent from + // publishers and send RFP to publishers, but cannot approve the proposals and + // deals by themselves. The buyer can approve the proposals and deals on behalf + // of the client. + // "CLIENT_DEAL_APPROVER" - Users associated with this client role can view, + // negotiate and approve proposals and deals in the Marketplace UI and send RFP + // to publishers. + Role string `json:"role,omitempty"` + // SellerVisible: Whether the client will be visible to sellers. + SellerVisible bool `json:"sellerVisible,omitempty"` + // State: Output only. The state of the client. + // + // Possible values: + // "STATE_UNSPECIFIED" - A placeholder for an undefined client state. Should + // not be used. + // "ACTIVE" - A client that is currently active and allowed to access the + // Authorized Buyers UI. + // "INACTIVE" - A client that is currently inactive and not allowed to access + // the Authorized Buyers UI. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "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 Client) MarshalJSON() ([]byte, error) { + type NoMethod Client + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ClientUser: A user of a client who has restricted access to the Marketplace +// and certain other sections of the Authorized Buyers UI based on the role +// granted to the associated client. +type ClientUser struct { + // Email: Required. The client user's email address that has to be unique + // across all users for the same client. + Email string `json:"email,omitempty"` + // Name: Output only. The resource name of the client user. Format: + // `buyers/{accountId}/clients/{clientAccountId}/users/{userId}` + Name string `json:"name,omitempty"` + // State: Output only. The state of the client user. + // + // Possible values: + // "STATE_UNSPECIFIED" - A placeholder for an undefined user state. + // "INVITED" - A user who was created but hasn't accepted the invitation yet, + // not allowed to access the Authorized Buyers UI. + // "ACTIVE" - A user that is currently active and allowed to access the + // Authorized Buyers UI. + // "INACTIVE" - A user that is currently inactive and not allowed to access + // the Authorized Buyers UI. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Email") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ClientUser) MarshalJSON() ([]byte, error) { + type NoMethod ClientUser + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Contact: Contains information on how a buyer or seller can be reached. +type Contact struct { + // DisplayName: The display_name of the contact. + DisplayName string `json:"displayName,omitempty"` + // Email: Email address for the contact. + Email string `json:"email,omitempty"` + // 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 Contact) MarshalJSON() ([]byte, error) { + type NoMethod Contact + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CreativeRequirements: Message captures data about the creatives in the deal. +type CreativeRequirements struct { + // CreativeFormat: Output only. The format of the creative, only applicable for + // programmatic guaranteed and preferred deals. + // + // Possible values: + // "CREATIVE_FORMAT_UNSPECIFIED" - A placeholder for an unspecified creative + // format. + // "DISPLAY" - Banner creatives such as image or HTML5 assets. + // "VIDEO" - Video creatives that can be played in a video player. + // "AUDIO" - Audio creatives that can play during audio content or point to a + // third party ad server. + CreativeFormat string `json:"creativeFormat,omitempty"` + // CreativePreApprovalPolicy: Output only. Specifies the creative pre-approval + // policy. + // + // Possible values: + // "CREATIVE_PRE_APPROVAL_POLICY_UNSPECIFIED" - A placeholder for an + // undefined creative pre-approval policy. + // "SELLER_PRE_APPROVAL_REQUIRED" - The seller needs to approve each creative + // before it can serve. + // "SELLER_PRE_APPROVAL_NOT_REQUIRED" - The seller does not need to approve + // each creative before it can serve. + CreativePreApprovalPolicy string `json:"creativePreApprovalPolicy,omitempty"` + // CreativeSafeFrameCompatibility: Output only. Specifies whether the creative + // is safeFrame compatible. + // + // Possible values: + // "CREATIVE_SAFE_FRAME_COMPATIBILITY_UNSPECIFIED" - A placeholder for an + // undefined creative safe-frame compatibility. + // "COMPATIBLE" - The creatives need to be compatible with the safe frame + // option. + // "INCOMPATIBLE" - The creatives can be incompatible with the safe frame + // option. + CreativeSafeFrameCompatibility string `json:"creativeSafeFrameCompatibility,omitempty"` + // MaxAdDurationMs: Output only. The max duration of the video creative in + // milliseconds. only applicable for deals with video creatives. + MaxAdDurationMs int64 `json:"maxAdDurationMs,omitempty,string"` + // ProgrammaticCreativeSource: Output only. Specifies the creative source for + // programmatic deals. PUBLISHER means creative is provided by seller and + // ADVERTISER means creative is provided by the buyer. + // + // Possible values: + // "PROGRAMMATIC_CREATIVE_SOURCE_UNSPECIFIED" - A placeholder for an + // undefined programmatic creative source. + // "ADVERTISER" - The advertiser provides the creatives. + // "PUBLISHER" - The publisher provides the creatives to be served. + ProgrammaticCreativeSource string `json:"programmaticCreativeSource,omitempty"` + // SkippableAdType: Output only. Skippable video ads allow viewers to skip ads + // after 5 seconds. Only applicable for deals with video creatives. + // + // Possible values: + // "SKIPPABLE_AD_TYPE_UNSPECIFIED" - A placeholder for an unspecified + // skippable ad type. + // "SKIPPABLE" - Video ad that can be skipped after 5 seconds. This value + // will appear in RTB bid requests as + // SkippableBidRequestType::REQUIRE_SKIPPABLE. + // "INSTREAM_SELECT" - Video ad that can be skipped after 5 seconds, and is + // counted as engaged view after 30 seconds. The creative is hosted on YouTube + // only, and viewcount of the YouTube video increments after the engaged view. + // This value will appear in RTB bid requests as + // SkippableBidRequestType::REQUIRE_SKIPPABLE. + // "NOT_SKIPPABLE" - This video ad is not skippable. This value will appear + // in RTB bid requests as SkippableBidRequestType::BLOCK_SKIPPABLE. + // "ANY" - This video ad can be skipped after 5 seconds or not-skippable. + // This value will appear in RTB bid requests as + // SkippableBidRequestType::ALLOW_SKIPPABLE. + SkippableAdType string `json:"skippableAdType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreativeFormat") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreativeFormat") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CreativeRequirements) MarshalJSON() ([]byte, error) { + type NoMethod CreativeRequirements + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// CriteriaTargeting: Generic targeting used for targeting dimensions that +// contains a list of included and excluded numeric IDs. This cannot be +// filtered using list filter syntax. +type CriteriaTargeting struct { + // ExcludedCriteriaIds: A list of numeric IDs to be excluded. + ExcludedCriteriaIds googleapi.Int64s `json:"excludedCriteriaIds,omitempty"` + // TargetedCriteriaIds: A list of numeric IDs to be included. + TargetedCriteriaIds googleapi.Int64s `json:"targetedCriteriaIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludedCriteriaIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExcludedCriteriaIds") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CriteriaTargeting) MarshalJSON() ([]byte, error) { + type NoMethod CriteriaTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DataSegment: Defines an identifier for a segment of inventory that can be +// targeted by curators or media planners in the deals or auction packages UI. +// Curation of inventory is done by curators on external platforms. +type DataSegment struct { + // CpmFee: Optional. This will be charged when other accounts use this data + // segment. For example, when other accounts add this data segment to a deal or + // auction package. + CpmFee *Money `json:"cpmFee,omitempty"` + // CreateTime: Output only. Time the data segment was created. + CreateTime string `json:"createTime,omitempty"` + // Name: Immutable. Identifier. The unique identifier for the data segment. + // Account ID corresponds to the account ID that created the segment. Format: + // `buyers/{accountId}/dataSegments/{curatorDataSegmentId}` + Name string `json:"name,omitempty"` + // State: Output only. The state of the data segment. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. + // "ACTIVE" - The data segment is active. + // "INACTIVE" - The data segment is inactive. + State string `json:"state,omitempty"` + // UpdateTime: Output only. Time the data segment was last updated. + 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. "CpmFee") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CpmFee") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DataSegment) MarshalJSON() ([]byte, error) { + type NoMethod DataSegment + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DayPart: Defines targeting for a period of time on a specific week day. +type DayPart struct { + // DayOfWeek: Day of week for the period. + // + // 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 + DayOfWeek string `json:"dayOfWeek,omitempty"` + // EndTime: Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is + // logically equivalent to 0, but is supported since in some cases there may + // need to be differentiation made between midnight on one day and midnight on + // the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only + // acceptable minute value for hour 24. Seconds and nanos are ignored. + EndTime *TimeOfDay `json:"endTime,omitempty"` + // StartTime: Hours in 24 hour time between 0 and 24, inclusive. Note: 24 is + // logically equivalent to 0, but is supported since in some cases there may + // need to be differentiation made between midnight on one day and midnight on + // the next day. Accepted values for minutes are [0, 15, 30, 45]. 0 is the only + // acceptable minute value for hour 24. Seconds and nanos are ignored. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "DayOfWeek") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DayOfWeek") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DayPart) MarshalJSON() ([]byte, error) { + type NoMethod DayPart + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DayPartTargeting: Represents Daypart targeting. +type DayPartTargeting struct { + // DayParts: The targeted weekdays and times + DayParts []*DayPart `json:"dayParts,omitempty"` + // TimeZoneType: The time zone type of the day parts + // + // Possible values: + // "TIME_ZONE_TYPE_UNSPECIFIED" - Default value. This field is unused. + // "SELLER" - The publisher's time zone + // "USER" - The user's time zone + TimeZoneType string `json:"timeZoneType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DayParts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DayParts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DayPartTargeting) MarshalJSON() ([]byte, error) { + type NoMethod DayPartTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DeactivateClientRequest: Request message for disabling a client. +type DeactivateClientRequest struct { +} + +// DeactivateClientUserRequest: Request message for deactivating a client user. +type DeactivateClientUserRequest struct { +} + +// DeactivateDataSegmentRequest: Request message for deactivating a data +// segment +type DeactivateDataSegmentRequest struct { +} + +// Deal: A deal represents a segment of inventory for displaying ads that +// contains the terms and targeting information that is used for serving as +// well as the deal stats and status. Note: A proposal may contain multiple +// deals. +type Deal struct { + // BilledBuyer: Output only. When the client field is populated, this field + // refers to the buyer who creates and manages the client buyer and gets billed + // on behalf of the client buyer; when the buyer field is populated, this field + // is the same value as buyer; when the deal belongs to a media planner + // account, this field will be empty. Format : `buyers/{buyerAccountId}` + BilledBuyer string `json:"billedBuyer,omitempty"` + // Buyer: Output only. Refers to a buyer in Real-time Bidding API's Buyer + // resource. Format: `buyers/{buyerAccountId}` + Buyer string `json:"buyer,omitempty"` + // Client: Output only. Refers to a Client. Format: + // `buyers/{buyerAccountId}/clients/{clientAccountid}` + Client string `json:"client,omitempty"` + // CreateTime: Output only. The time of the deal creation. + CreateTime string `json:"createTime,omitempty"` + // CreativeRequirements: Output only. Metadata about the creatives of this + // deal. + CreativeRequirements *CreativeRequirements `json:"creativeRequirements,omitempty"` + // DealType: Output only. Type of deal. + // + // Possible values: + // "DEAL_TYPE_UNSPECIFIED" - Default, unspecified deal type. + // "PREFERRED_DEAL" - Preferred deals. + // "PRIVATE_AUCTION" - Private auction deals. + // "PROGRAMMATIC_GUARANTEED" - Programmatic guaranteed deals. + DealType string `json:"dealType,omitempty"` + // DeliveryControl: Output only. Specifies the pacing set by the publisher. + DeliveryControl *DeliveryControl `json:"deliveryControl,omitempty"` + // Description: Output only. Free text description for the deal terms. + Description string `json:"description,omitempty"` + // DisplayName: Output only. The name of the deal. Maximum length of 255 + // unicode characters is allowed. Control characters are not allowed. Buyers + // cannot update this field. Note: Not to be confused with name, which is a + // unique identifier of the deal. + DisplayName string `json:"displayName,omitempty"` + // EligibleSeatIds: Output only. If set, this field contains the list of DSP + // specific seat ids set by media planners that are eligible to transact on + // this deal. The seat ID is in the calling DSP's namespace. + EligibleSeatIds []string `json:"eligibleSeatIds,omitempty"` + // EstimatedGrossSpend: Specified by buyers in request for proposal (RFP) to + // notify publisher the total estimated spend for the proposal. Publishers will + // receive this information and send back proposed deals accordingly. + EstimatedGrossSpend *Money `json:"estimatedGrossSpend,omitempty"` + // FlightEndTime: Proposed flight end time of the deal. This will generally be + // stored in a granularity of a second. A value is not necessary for Private + // Auction deals. + FlightEndTime string `json:"flightEndTime,omitempty"` + // FlightStartTime: Proposed flight start time of the deal. This will generally + // be stored in the granularity of one second since deal serving starts at + // seconds boundary. Any time specified with more granularity (for example, in + // milliseconds) will be truncated towards the start of time in seconds. + FlightStartTime string `json:"flightStartTime,omitempty"` + // MediaPlanner: Output only. Refers to a buyer in Real-time Bidding API's + // Buyer resource. This field represents a media planner (For example, agency + // or big advertiser). + MediaPlanner *MediaPlanner `json:"mediaPlanner,omitempty"` + // Name: Immutable. The unique identifier of the deal. Auto-generated by the + // server when a deal is created. Format: + // buyers/{accountId}/proposals/{proposalId}/deals/{dealId} + Name string `json:"name,omitempty"` + // PreferredDealTerms: The terms for preferred deals. + PreferredDealTerms *PreferredDealTerms `json:"preferredDealTerms,omitempty"` + // PrivateAuctionTerms: The terms for private auction deals. + PrivateAuctionTerms *PrivateAuctionTerms `json:"privateAuctionTerms,omitempty"` + // ProgrammaticGuaranteedTerms: The terms for programmatic guaranteed deals. + ProgrammaticGuaranteedTerms *ProgrammaticGuaranteedTerms `json:"programmaticGuaranteedTerms,omitempty"` + // ProposalRevision: Output only. The revision number for the proposal and is + // the same value as proposal.proposal_revision. Each update to deal causes the + // proposal revision number to auto-increment. The buyer keeps track of the + // last revision number they know of and pass it in when making an update. If + // the head revision number on the server has since incremented, then an + // ABORTED error is returned during the update operation to let the buyer know + // that a subsequent update was made. + ProposalRevision int64 `json:"proposalRevision,omitempty,string"` + // PublisherProfile: Immutable. Reference to the seller on the deal. Format: + // `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` + PublisherProfile string `json:"publisherProfile,omitempty"` + // SellerTimeZone: Output only. Time zone of the seller used to mark the + // boundaries of a day for daypart targeting and CPD billing. + SellerTimeZone *TimeZone `json:"sellerTimeZone,omitempty"` + // Targeting: Specifies the subset of inventory targeted by the deal. Can be + // updated by the buyer before the deal is finalized. + Targeting *MarketplaceTargeting `json:"targeting,omitempty"` + // UpdateTime: Output only. The time when the deal was last updated. + 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. "BilledBuyer") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BilledBuyer") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Deal) MarshalJSON() ([]byte, error) { + type NoMethod Deal + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DealPausingInfo: Information related to deal pausing. +type DealPausingInfo struct { + // PauseReason: The reason for the pausing of the deal; empty for active deals. + PauseReason string `json:"pauseReason,omitempty"` + // PauseRole: The party that first paused the deal; unspecified for active + // deals. + // + // Possible values: + // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined + // buyer/seller role. + // "BUYER" - Specifies the role as buyer. + // "SELLER" - Specifies the role as seller. + PauseRole string `json:"pauseRole,omitempty"` + // PausingConsented: Whether pausing is consented between buyer and seller for + // the deal. + PausingConsented bool `json:"pausingConsented,omitempty"` + // ForceSendFields is a list of field names (e.g. "PauseReason") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PauseReason") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DealPausingInfo) MarshalJSON() ([]byte, error) { + type NoMethod DealPausingInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DeliveryControl: Message contains details about how the deal will be paced. +type DeliveryControl struct { + // CompanionDeliveryType: Output only. Specifies roadblocking in a main + // companion lineitem. + // + // Possible values: + // "COMPANION_DELIVERY_TYPE_UNSPECIFIED" - A placeholder for an unspecified + // companion delivery type. + // "DELIVERY_OPTIONAL" - Companions are not required to serve a creative set. + // The creative set can serve an inventory that has zero or more matching + // companions. + // "DELIVERY_AT_LEAST_ONE" - At least one companion must be served in order + // for the creative set to be used. + // "DELIVERY_ALL" - All companions in the set must be served in order for the + // creative set to be used. This can still serve to inventory that has more + // companions than can be filled. + CompanionDeliveryType string `json:"companionDeliveryType,omitempty"` + // CreativeRotationType: Output only. Specifies strategy to use for selecting a + // creative when multiple creatives of the same size are available. + // + // Possible values: + // "CREATIVE_ROTATION_TYPE_UNSPECIFIED" - Creatives are displayed roughly the + // same number of times over the duration of the deal. + // "ROTATION_EVEN" - Creatives are displayed roughly the same number of times + // over the duration of the deal. + // "ROTATION_OPTIMIZED" - Creatives are served roughly proportionally to + // their performance. + // "ROTATION_MANUAL" - Creatives are served roughly proportionally to their + // weights. + // "ROTATION_SEQUENTIAL" - Creatives are served exactly in sequential order, + // also known as Storyboarding. + CreativeRotationType string `json:"creativeRotationType,omitempty"` + // DeliveryRateType: Output only. Specifies how the impression delivery will be + // paced. + // + // Possible values: + // "DELIVERY_RATE_TYPE_UNSPECIFIED" - A placeholder for an undefined delivery + // rate type. + // "EVENLY" - Impressions are served uniformly over the life of the deal. + // "FRONT_LOADED" - Impressions are served front-loaded. + // "AS_FAST_AS_POSSIBLE" - Impressions are served as fast as possible. + DeliveryRateType string `json:"deliveryRateType,omitempty"` + // FrequencyCap: Output only. Specifies any frequency caps. Cannot be filtered + // within ListDealsRequest. + FrequencyCap []*FrequencyCap `json:"frequencyCap,omitempty"` + // RoadblockingType: Output only. Specifies the roadblocking type in display + // creatives. + // + // Possible values: + // "ROADBLOCKING_TYPE_UNSPECIFIED" - A placeholder for an unspecified + // roadblocking type. + // "ONLY_ONE" - Only one creative from a deal can serve per ad request. + // https://support.google.com/admanager/answer/177277. + // "ONE_OR_MORE" - Any number of creatives from a deal can serve together per + // ad request. + // "AS_MANY_AS_POSSIBLE" - As many creatives from a deal as can fit on a page + // will serve. This could mean anywhere from one to all of a deal's creatives + // given the size constraints of ad slots on a page. + // "ALL_ROADBLOCK" - All or none of the creatives from a deal will serve. + // "CREATIVE_SET" - A main/companion creative set roadblocking type. + RoadblockingType string `json:"roadblockingType,omitempty"` + // ForceSendFields is a list of field names (e.g. "CompanionDeliveryType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CompanionDeliveryType") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DeliveryControl) MarshalJSON() ([]byte, error) { + type NoMethod DeliveryControl + 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 +// { 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:"-"` +} + +// FinalizedDeal: A finalized deal is a snapshot of the deal when both buyer +// and seller accept the deal. The buyer or seller can update the deal after +// it's been finalized and renegotiate on the deal targeting, terms and other +// fields, while at the same time the finalized snapshot of the deal can still +// be retrieved using this API. The finalized deal contains a copy of the deal +// as it existed when most recently finalized, as well as fields related to +// deal serving such as pause/resume status, RTB metrics, and more. +type FinalizedDeal struct { + // Deal: A copy of the Deal made upon finalization. During renegotiation, this + // will reflect the last finalized deal before renegotiation was initiated. + Deal *Deal `json:"deal,omitempty"` + // DealPausingInfo: Information related to deal pausing for the deal. + DealPausingInfo *DealPausingInfo `json:"dealPausingInfo,omitempty"` + // DealServingStatus: Serving status of the deal. + // + // Possible values: + // "DEAL_SERVING_STATUS_UNSPECIFIED" - Unspecified. + // "ACTIVE" - The deal is actively serving or ready to serve when the start + // date is reached. + // "ENDED" - The deal serving has ended. + // "PAUSED_BY_BUYER" - The deal serving is paused by buyer. + // "PAUSED_BY_SELLER" - The deal serving is paused by seller. + DealServingStatus string `json:"dealServingStatus,omitempty"` + // Name: The resource name of the finalized deal. Format: + // `buyers/{accountId}/finalizedDeals/{finalizedDealId}` + Name string `json:"name,omitempty"` + // ReadyToServe: Whether the Programmatic Guaranteed deal is ready for serving. + ReadyToServe bool `json:"readyToServe,omitempty"` + // RtbMetrics: Real-time bidding metrics for this deal. + RtbMetrics *RtbMetrics `json:"rtbMetrics,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Deal") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Deal") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FinalizedDeal) MarshalJSON() ([]byte, error) { + type NoMethod FinalizedDeal + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FirstPartyMobileApplicationTargeting: Represents a list of targeted and +// excluded mobile application IDs that publishers own. Android App ID, for +// example, com.google.android.apps.maps, can be found in Google Play Store +// URL. iOS App ID (which is a number) can be found at the end of iTunes store +// URL. First party mobile applications is either included or excluded. +type FirstPartyMobileApplicationTargeting struct { + // ExcludedAppIds: A list of application IDs to be excluded. + ExcludedAppIds []string `json:"excludedAppIds,omitempty"` + // TargetedAppIds: A list of application IDs to be included. + TargetedAppIds []string `json:"targetedAppIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludedAppIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExcludedAppIds") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FirstPartyMobileApplicationTargeting) MarshalJSON() ([]byte, error) { + type NoMethod FirstPartyMobileApplicationTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// FrequencyCap: Message contains details about publisher-set frequency caps of +// the delivery. +type FrequencyCap struct { + // MaxImpressions: The maximum number of impressions that can be served to a + // user within the specified time period. + MaxImpressions int64 `json:"maxImpressions,omitempty"` + // TimeUnitType: The time unit. Along with num_time_units defines the amount of + // time over which impressions per user are counted and capped. + // + // Possible values: + // "TIME_UNIT_TYPE_UNSPECIFIED" - A placeholder for an undefined time unit + // type. This just indicates the variable with this value hasn't been + // initialized. + // "MINUTE" - Minute unit. + // "HOUR" - Hour unit. + // "DAY" - Day unit. + // "WEEK" - Week unit. + // "MONTH" - Month unit. + // "LIFETIME" - Lifecycle/Lifetime unit. + // "POD" - Pod unit. + // "STREAM" - Stream unit. + TimeUnitType string `json:"timeUnitType,omitempty"` + // TimeUnitsCount: The amount of time, in the units specified by + // time_unit_type. Defines the amount of time over which impressions per user + // are counted and capped. + TimeUnitsCount int64 `json:"timeUnitsCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxImpressions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxImpressions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FrequencyCap) MarshalJSON() ([]byte, error) { + type NoMethod FrequencyCap + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InventorySizeTargeting: Represents the size of an ad unit that can be +// targeted on a bid request. +type InventorySizeTargeting struct { + // ExcludedInventorySizes: A list of inventory sizes to be excluded. + ExcludedInventorySizes []*AdSize `json:"excludedInventorySizes,omitempty"` + // TargetedInventorySizes: A list of inventory sizes to be included. + TargetedInventorySizes []*AdSize `json:"targetedInventorySizes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludedInventorySizes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExcludedInventorySizes") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InventorySizeTargeting) MarshalJSON() ([]byte, error) { + type NoMethod InventorySizeTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InventoryTypeTargeting: Targeting of the inventory types a bid request can +// originate from. +type InventoryTypeTargeting struct { + // InventoryTypes: The list of targeted inventory types for the bid request. + // + // Possible values: + // "INVENTORY_TYPE_UNSPECIFIED" - Unspecified inventory type + // "BROWSER" - Desktop or mobile web browser excluding ads inside a video + // player + // "MOBILE_APP" - Mobile apps other than video players and web browsers + // "VIDEO_PLAYER" - Instream video and audio + InventoryTypes []string `json:"inventoryTypes,omitempty"` + // ForceSendFields is a list of field names (e.g. "InventoryTypes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InventoryTypes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InventoryTypeTargeting) MarshalJSON() ([]byte, error) { + type NoMethod InventoryTypeTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAuctionPackagesResponse: Response message for listing auction packages. +type ListAuctionPackagesResponse struct { + // AuctionPackages: The list of auction packages. + AuctionPackages []*AuctionPackage `json:"auctionPackages,omitempty"` + // NextPageToken: Continuation token for fetching the next page of results. + // Pass this value in the ListAuctionPackagesRequest.pageToken field in the + // subsequent call to the `ListAuctionPackages` method 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:"-"` + // ForceSendFields is a list of field names (e.g. "AuctionPackages") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuctionPackages") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAuctionPackagesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAuctionPackagesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListClientUsersResponse: Response message for the list method. +type ListClientUsersResponse struct { + // ClientUsers: The returned list of client users. + ClientUsers []*ClientUser `json:"clientUsers,omitempty"` + // NextPageToken: A token to retrieve the next page of results. Pass this value + // in the ListClientUsersRequest.pageToken field in the subsequent call to the + // list method 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:"-"` + // ForceSendFields is a list of field names (e.g. "ClientUsers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClientUsers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListClientUsersResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClientUsersResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListClientsResponse: Response message for the list method. +type ListClientsResponse struct { + // Clients: The returned list of clients. + Clients []*Client `json:"clients,omitempty"` + // NextPageToken: A token to retrieve the next page of results. Pass this value + // in the ListClientsRequest.pageToken field in the subsequent call to the list + // method 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:"-"` + // ForceSendFields is a list of field names (e.g. "Clients") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clients") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListClientsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListClientsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListDataSegmentsResponse: Response message for listing data segments. +type ListDataSegmentsResponse struct { + // DataSegments: The list of data segments. + DataSegments []*DataSegment `json:"dataSegments,omitempty"` + // NextPageToken: Continuation token for fetching the next page of results. + // Pass this value in the ListDataSegmentsRequest.pageToken field in the + // subsequent call to the `ListDataSegments` method 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:"-"` + // ForceSendFields is a list of field names (e.g. "DataSegments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataSegments") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListDataSegmentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDataSegmentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListDealsResponse: Response message for listing deals in a proposal. +type ListDealsResponse struct { + // Deals: The list of deals. + Deals []*Deal `json:"deals,omitempty"` + // NextPageToken: Token to fetch the next page of 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. "Deals") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Deals") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListDealsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListDealsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListFinalizedDealsResponse: Response message for listing finalized deals. +type ListFinalizedDealsResponse struct { + // FinalizedDeals: The list of finalized deals. + FinalizedDeals []*FinalizedDeal `json:"finalizedDeals,omitempty"` + // NextPageToken: Token to fetch the next page of 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. "FinalizedDeals") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FinalizedDeals") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListFinalizedDealsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListFinalizedDealsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListProposalsResponse: Response message for listing proposals. +type ListProposalsResponse struct { + // NextPageToken: Continuation token for fetching the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + // Proposals: The list of proposals. + Proposals []*Proposal `json:"proposals,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 ListProposalsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListProposalsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListPublisherProfilesResponse: Response message for profiles visible to the +// buyer. +type ListPublisherProfilesResponse struct { + // NextPageToken: Token to fetch the next page of results. + NextPageToken string `json:"nextPageToken,omitempty"` + // PublisherProfiles: The list of matching publisher profiles. + PublisherProfiles []*PublisherProfile `json:"publisherProfiles,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 ListPublisherProfilesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListPublisherProfilesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MarketplaceTargeting: Targeting represents different criteria that can be +// used to target deals or auction packages. For example, they can choose to +// target inventory only if the user is in the US. Multiple types of targeting +// are always applied as a logical AND, unless noted otherwise. +type MarketplaceTargeting struct { + // DaypartTargeting: Daypart targeting information. + DaypartTargeting *DayPartTargeting `json:"daypartTargeting,omitempty"` + // ExcludedSensitiveCategoryIds: Output only. The sensitive content category + // label IDs excluded. Refer to this file + // https://storage.googleapis.com/adx-rtb-dictionaries/content-labels.txt for + // category IDs. + ExcludedSensitiveCategoryIds googleapi.Int64s `json:"excludedSensitiveCategoryIds,omitempty"` + // GeoTargeting: Output only. Geo criteria IDs to be included/excluded. + GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"` + // InventorySizeTargeting: Output only. Inventory sizes to be + // included/excluded. + InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"` + // InventoryTypeTargeting: Output only. Inventory type targeting information. + InventoryTypeTargeting *InventoryTypeTargeting `json:"inventoryTypeTargeting,omitempty"` + // PlacementTargeting: Output only. Placement targeting information, for + // example, URL, mobile applications. + PlacementTargeting *PlacementTargeting `json:"placementTargeting,omitempty"` + // TechnologyTargeting: Output only. Technology targeting information, for + // example, operating system, device category. + TechnologyTargeting *TechnologyTargeting `json:"technologyTargeting,omitempty"` + // UserListTargeting: Buyer user list targeting information. User lists can be + // uploaded using + // https://developers.google.com/authorized-buyers/rtb/bulk-uploader. + UserListTargeting *CriteriaTargeting `json:"userListTargeting,omitempty"` + // VerticalTargeting: Output only. The verticals included or excluded as + // defined in + // https://developers.google.com/authorized-buyers/rtb/downloads/publisher-verticals + VerticalTargeting *CriteriaTargeting `json:"verticalTargeting,omitempty"` + // VideoTargeting: Output only. Video targeting information. + VideoTargeting *VideoTargeting `json:"videoTargeting,omitempty"` + // ForceSendFields is a list of field names (e.g. "DaypartTargeting") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DaypartTargeting") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MarketplaceTargeting) MarshalJSON() ([]byte, error) { + type NoMethod MarketplaceTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MediaPlanner: Describes a single Media Planner account. +type MediaPlanner struct { + // AccountId: Output only. Account ID of the media planner. + AccountId string `json:"accountId,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 MediaPlanner) MarshalJSON() ([]byte, error) { + type NoMethod MediaPlanner + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MobileApplicationTargeting: Mobile application targeting settings. +type MobileApplicationTargeting struct { + // FirstPartyTargeting: Publisher owned apps to be targeted or excluded by the + // publisher to display the ads in. + FirstPartyTargeting *FirstPartyMobileApplicationTargeting `json:"firstPartyTargeting,omitempty"` + // ForceSendFields is a list of field names (e.g. "FirstPartyTargeting") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FirstPartyTargeting") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MobileApplicationTargeting) MarshalJSON() ([]byte, error) { + type NoMethod MobileApplicationTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Money: Represents an amount of money with its currency type. +type Money struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + // Nanos: Number of nano (10^-9) units of the amount. The value must be between + // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, + // or negative. If `units` is negative, `nanos` must be negative or zero. For + // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + // Units: The whole units of the amount. For example if `currencyCode` is + // "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CurrencyCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Money) MarshalJSON() ([]byte, error) { + type NoMethod Money + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Note: A text note attached to the proposal to facilitate the communication +// between buyers and sellers. +type Note struct { + // CreateTime: Output only. When this note was created. + CreateTime string `json:"createTime,omitempty"` + // CreatorRole: Output only. The role who created the note. + // + // Possible values: + // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined + // buyer/seller role. + // "BUYER" - Specifies the role as buyer. + // "SELLER" - Specifies the role as seller. + CreatorRole string `json:"creatorRole,omitempty"` + // Note: The text of the note. Maximum length is 1024 characters. + Note string `json:"note,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 Note) MarshalJSON() ([]byte, error) { + type NoMethod Note + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// OperatingSystemTargeting: Represents targeting information for operating +// systems. +type OperatingSystemTargeting struct { + // OperatingSystemCriteria: IDs of operating systems to be included/excluded. + OperatingSystemCriteria *CriteriaTargeting `json:"operatingSystemCriteria,omitempty"` + // OperatingSystemVersionCriteria: IDs of operating system versions to be + // included/excluded. + OperatingSystemVersionCriteria *CriteriaTargeting `json:"operatingSystemVersionCriteria,omitempty"` + // ForceSendFields is a list of field names (e.g. "OperatingSystemCriteria") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OperatingSystemCriteria") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperatingSystemTargeting) MarshalJSON() ([]byte, error) { + type NoMethod OperatingSystemTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PauseFinalizedDealRequest: Request message for pausing a finalized deal. +type PauseFinalizedDealRequest struct { + // Reason: The reason to pause the finalized deal, will be displayed to the + // seller. Maximum length is 1000 characters. + 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 PauseFinalizedDealRequest) MarshalJSON() ([]byte, error) { + type NoMethod PauseFinalizedDealRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PlacementTargeting: Represents targeting about where the ads can appear, for +// example, certain sites or mobile applications. Different placement targeting +// types will be logically OR'ed. +type PlacementTargeting struct { + // MobileApplicationTargeting: Mobile application targeting information in a + // deal. This doesn't apply to Auction Packages. + MobileApplicationTargeting *MobileApplicationTargeting `json:"mobileApplicationTargeting,omitempty"` + // UriTargeting: URLs to be included/excluded. + UriTargeting *UriTargeting `json:"uriTargeting,omitempty"` + // ForceSendFields is a list of field names (e.g. "MobileApplicationTargeting") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MobileApplicationTargeting") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PlacementTargeting) MarshalJSON() ([]byte, error) { + type NoMethod PlacementTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PreferredDealTerms: Pricing terms for Preferred Deals. +type PreferredDealTerms struct { + // FixedPrice: Fixed price for the deal. + FixedPrice *Price `json:"fixedPrice,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedPrice") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FixedPrice") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PreferredDealTerms) MarshalJSON() ([]byte, error) { + type NoMethod PreferredDealTerms + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Price: Represents a price and a pricing type for a deal. +type Price struct { + // Amount: The actual price with currency specified. + Amount *Money `json:"amount,omitempty"` + // Type: The pricing type for the deal. + // + // Possible values: + // "TYPE_UNSPECIFIED" - A placeholder for an undefined pricing type. If the + // pricing type is unspecified, CPM will be used instead. + // "CPM" - Cost per thousand impressions. + // "CPD" - Cost per day. + Type string `json:"type,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 Price) MarshalJSON() ([]byte, error) { + type NoMethod Price + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PrivateAuctionTerms: Pricing terms for Private Auctions. +type PrivateAuctionTerms struct { + // FloorPrice: The minimum price buyer has to bid to compete in the private + // auction. + FloorPrice *Price `json:"floorPrice,omitempty"` + // OpenAuctionAllowed: Output only. True if open auction buyers are allowed to + // compete with invited buyers in this private auction. + OpenAuctionAllowed bool `json:"openAuctionAllowed,omitempty"` + // ForceSendFields is a list of field names (e.g. "FloorPrice") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FloorPrice") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PrivateAuctionTerms) MarshalJSON() ([]byte, error) { + type NoMethod PrivateAuctionTerms + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PrivateData: Buyers are allowed to store certain types of private data in a +// proposal or deal. +type PrivateData struct { + // ReferenceId: A buyer specified reference ID. This can be queried in the list + // operations (max-length: 1024 unicode code units). + ReferenceId string `json:"referenceId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReferenceId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReferenceId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PrivateData) MarshalJSON() ([]byte, error) { + type NoMethod PrivateData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ProgrammaticGuaranteedTerms: Pricing terms for Programmatic Guaranteed +// Deals. +type ProgrammaticGuaranteedTerms struct { + // FixedPrice: Fixed price for the deal. + FixedPrice *Price `json:"fixedPrice,omitempty"` + // GuaranteedLooks: Count of guaranteed looks. For CPD deals, buyer changes to + // guaranteed_looks will be ignored. + GuaranteedLooks int64 `json:"guaranteedLooks,omitempty,string"` + // ImpressionCap: The lifetime impression cap for CPM Sponsorship deals. Deal + // will stop serving when cap is reached. + ImpressionCap int64 `json:"impressionCap,omitempty,string"` + // MinimumDailyLooks: Daily minimum looks for CPD deal types. For CPD deals, + // buyer should negotiate on this field instead of guaranteed_looks. + MinimumDailyLooks int64 `json:"minimumDailyLooks,omitempty,string"` + // PercentShareOfVoice: For sponsorship deals, this is the percentage of the + // seller's eligible impressions that the deal will serve until the cap is + // reached. Valid value is within range 0~100. + PercentShareOfVoice int64 `json:"percentShareOfVoice,omitempty,string"` + // ReservationType: The reservation type for a Programmatic Guaranteed deal. + // This indicates whether the number of impressions is fixed, or a percent of + // available impressions. If not specified, the default reservation type is + // STANDARD. + // + // Possible values: + // "RESERVATION_TYPE_UNSPECIFIED" - An unspecified reservation type. + // "STANDARD" - Non-sponsorship deal. + // "SPONSORSHIP" - Sponsorship deals don't have impression goal + // (guaranteed_looks) and they are served based on the flight dates. For CPM + // Sponsorship deals, impression_cap is the lifetime impression limit. + ReservationType string `json:"reservationType,omitempty"` + // ForceSendFields is a list of field names (e.g. "FixedPrice") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FixedPrice") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ProgrammaticGuaranteedTerms) MarshalJSON() ([]byte, error) { + type NoMethod ProgrammaticGuaranteedTerms + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Proposal: Represents a proposal in the Marketplace. A proposal is the unit +// of negotiation between a seller and a buyer. +type Proposal struct { + // BilledBuyer: Output only. When the client field is populated, this field + // refers to the buyer who creates and manages the client buyer and gets billed + // on behalf of the client buyer; when the buyer field is populated, this field + // is the same value as buyer. Format : `buyers/{buyerAccountId}` + BilledBuyer string `json:"billedBuyer,omitempty"` + // Buyer: Output only. Refers to a buyer in The Realtime-bidding API. Format: + // `buyers/{buyerAccountId}` + Buyer string `json:"buyer,omitempty"` + // BuyerContacts: Contact information for the buyer. + BuyerContacts []*Contact `json:"buyerContacts,omitempty"` + // BuyerPrivateData: Buyer private data (hidden from seller). + BuyerPrivateData *PrivateData `json:"buyerPrivateData,omitempty"` + // Client: Output only. Refers to a Client. Format: + // `buyers/{buyerAccountId}/clients/{clientAccountid}` + Client string `json:"client,omitempty"` + // DealType: Output only. Type of deal the proposal contains. + // + // Possible values: + // "DEAL_TYPE_UNSPECIFIED" - Default, unspecified deal type. + // "PREFERRED_DEAL" - Preferred deals. + // "PRIVATE_AUCTION" - Private auction deals. + // "PROGRAMMATIC_GUARANTEED" - Programmatic guaranteed deals. + DealType string `json:"dealType,omitempty"` + // DisplayName: Output only. The descriptive name for the proposal. Maximum + // length of 255 unicode characters is allowed. Control characters are not + // allowed. Buyers cannot update this field. Note: Not to be confused with + // name, which is a unique identifier of the proposal. + DisplayName string `json:"displayName,omitempty"` + // IsRenegotiating: Output only. True if the proposal was previously finalized + // and is now being renegotiated. + IsRenegotiating bool `json:"isRenegotiating,omitempty"` + // LastUpdaterOrCommentorRole: Output only. The role of the last user that + // either updated the proposal or left a comment. + // + // Possible values: + // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined + // buyer/seller role. + // "BUYER" - Specifies the role as buyer. + // "SELLER" - Specifies the role as seller. + LastUpdaterOrCommentorRole string `json:"lastUpdaterOrCommentorRole,omitempty"` + // Name: Immutable. The name of the proposal serving as a unique identifier. + // Format: buyers/{accountId}/proposals/{proposalId} + Name string `json:"name,omitempty"` + // Notes: A list of notes from the buyer and the seller attached to this + // proposal. + Notes []*Note `json:"notes,omitempty"` + // OriginatorRole: Output only. Indicates whether the buyer/seller created the + // proposal. + // + // Possible values: + // "BUYER_SELLER_ROLE_UNSPECIFIED" - A placeholder for an undefined + // buyer/seller role. + // "BUYER" - Specifies the role as buyer. + // "SELLER" - Specifies the role as seller. + OriginatorRole string `json:"originatorRole,omitempty"` + // PausingConsented: Whether pausing is allowed for the proposal. This is a + // negotiable term between buyers and publishers. + PausingConsented bool `json:"pausingConsented,omitempty"` + // ProposalRevision: Output only. The revision number for the proposal. Each + // update to the proposal or deal causes the proposal revision number to + // auto-increment. The buyer keeps track of the last revision number they know + // of and pass it in when making an update. If the head revision number on the + // server has since incremented, then an ABORTED error is returned during the + // update operation to let the buyer know that a subsequent update was made. + ProposalRevision int64 `json:"proposalRevision,omitempty,string"` + // PublisherProfile: Immutable. Reference to the seller on the proposal. + // Format: `buyers/{buyerAccountId}/publisherProfiles/{publisherProfileId}` + // Note: This field may be set only when creating the resource. Modifying this + // field while updating the resource will result in an error. + PublisherProfile string `json:"publisherProfile,omitempty"` + // SellerContacts: Output only. Contact information for the seller. + SellerContacts []*Contact `json:"sellerContacts,omitempty"` + // State: Output only. Indicates the state of the proposal. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified proposal state + // "BUYER_REVIEW_REQUESTED" - When a proposal is waiting for buyer to review. + // "SELLER_REVIEW_REQUESTED" - When the proposal is waiting for the seller to + // review. + // "BUYER_ACCEPTANCE_REQUESTED" - When the seller accepted the proposal and + // sent it to the buyer for review. + // "FINALIZED" - When both buyer and seller has accepted the proposal + // "TERMINATED" - When either buyer or seller has cancelled the proposal + State string `json:"state,omitempty"` + // TermsAndConditions: Output only. The terms and conditions associated with + // this proposal. Accepting a proposal implies acceptance of this field. This + // is created by the seller, the buyer can only view it. + TermsAndConditions string `json:"termsAndConditions,omitempty"` + // UpdateTime: Output only. The time when the proposal was last revised. + 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. "BilledBuyer") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BilledBuyer") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Proposal) MarshalJSON() ([]byte, error) { + type NoMethod Proposal + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PublisherProfile: The values in the publisher profile are supplied by the +// publisher. All fields are not filterable unless stated otherwise. +type PublisherProfile struct { + // AudienceDescription: Description on the publisher's audience. + AudienceDescription string `json:"audienceDescription,omitempty"` + // DirectDealsContact: Contact information for direct reservation deals. This + // is free text entered by the publisher and may include information like + // names, phone numbers and email addresses. + DirectDealsContact string `json:"directDealsContact,omitempty"` + // DisplayName: Display name of the publisher profile. Can be used to filter + // the response of the publisherProfiles.list method. + DisplayName string `json:"displayName,omitempty"` + // Domains: The list of domains represented in this publisher profile. Empty if + // this is a parent profile. These are top private domains, meaning that these + // will not contain a string like "photos.google.co.uk/123", but will instead + // contain "google.co.uk". Can be used to filter the response of the + // publisherProfiles.list method. + Domains []string `json:"domains,omitempty"` + // IsParent: Indicates if this profile is the parent profile of the seller. A + // parent profile represents all the inventory from the seller, as opposed to + // child profile that is created to brand a portion of inventory. One seller + // has only one parent publisher profile, and can have multiple child profiles. + // See https://support.google.com/admanager/answer/6035806 for details. Can be + // used to filter the response of the publisherProfiles.list method by setting + // the filter to "is_parent: true". + IsParent bool `json:"isParent,omitempty"` + // LogoUrl: A Google public URL to the logo for this publisher profile. The + // logo is stored as a PNG, JPG, or GIF image. + LogoUrl string `json:"logoUrl,omitempty"` + // MediaKitUrl: URL to additional marketing and sales materials. + MediaKitUrl string `json:"mediaKitUrl,omitempty"` + // MobileApps: The list of apps represented in this publisher profile. Empty if + // this is a parent profile. + MobileApps []*PublisherProfileMobileApplication `json:"mobileApps,omitempty"` + // Name: Name of the publisher profile. Format: + // `buyers/{buyer}/publisherProfiles/{publisher_profile}` + Name string `json:"name,omitempty"` + // Overview: Overview of the publisher. + Overview string `json:"overview,omitempty"` + // PitchStatement: Statement explaining what's unique about publisher's + // business, and why buyers should partner with the publisher. + PitchStatement string `json:"pitchStatement,omitempty"` + // ProgrammaticDealsContact: Contact information for programmatic deals. This + // is free text entered by the publisher and may include information like + // names, phone numbers and email addresses. + ProgrammaticDealsContact string `json:"programmaticDealsContact,omitempty"` + // PublisherCode: A unique identifying code for the seller. This value is the + // same for all of the seller's parent and child publisher profiles. Can be + // used to filter the response of the publisherProfiles.list method. + PublisherCode string `json:"publisherCode,omitempty"` + // SamplePageUrl: URL to a sample content page. + SamplePageUrl string `json:"samplePageUrl,omitempty"` + // TopHeadlines: Up to three key metrics and rankings. For example, "#1 Mobile + // News Site for 20 Straight Months". + TopHeadlines []string `json:"topHeadlines,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AudienceDescription") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AudienceDescription") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PublisherProfile) MarshalJSON() ([]byte, error) { + type NoMethod PublisherProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// PublisherProfileMobileApplication: A mobile application that contains a +// external app ID, name, and app store. +type PublisherProfileMobileApplication struct { + // AppStore: The app store the app belongs to. Can be used to filter the + // response of the publisherProfiles.list method. + // + // Possible values: + // "APP_STORE_TYPE_UNSPECIFIED" - A placeholder for an unknown app store. + // "APPLE_ITUNES" - Apple iTunes + // "GOOGLE_PLAY" - Google Play + // "ROKU" - Roku + // "AMAZON_FIRE_TV" - Amazon Fire TV + // "PLAYSTATION" - PlayStation + // "XBOX" - Xbox + // "SAMSUNG_TV" - Samsung TV + // "AMAZON" - Amazon Appstore + // "OPPO" - OPPO App Market + // "SAMSUNG" - Samsung Galaxy Store + // "VIVO" - VIVO App Store + // "XIAOMI" - Xiaomi GetApps + // "LG_TV" - LG TV + AppStore string `json:"appStore,omitempty"` + // ExternalAppId: The external ID for the app from its app store. Can be used + // to filter the response of the publisherProfiles.list method. + ExternalAppId string `json:"externalAppId,omitempty"` + // Name: The name of the app. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "AppStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AppStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PublisherProfileMobileApplication) MarshalJSON() ([]byte, error) { + type NoMethod PublisherProfileMobileApplication + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ResumeFinalizedDealRequest: Request message for resuming a finalized deal. +type ResumeFinalizedDealRequest struct { +} + +// RtbMetrics: Real-time bidding metrics. For what each metric means refer to +// Report metrics +// (https://support.google.com/adxbuyer/answer/6115195#report-metrics) +type RtbMetrics struct { + // AdImpressions7Days: Ad impressions in last 7 days. + AdImpressions7Days int64 `json:"adImpressions7Days,omitempty,string"` + // BidRate7Days: Bid rate in last 7 days, calculated by (bids / bid requests). + BidRate7Days float64 `json:"bidRate7Days,omitempty"` + // BidRequests7Days: Bid requests in last 7 days. + BidRequests7Days int64 `json:"bidRequests7Days,omitempty,string"` + // Bids7Days: Bids in last 7 days. + Bids7Days int64 `json:"bids7Days,omitempty,string"` + // FilteredBidRate7Days: Filtered bid rate in last 7 days, calculated by + // (filtered bids / bids). + FilteredBidRate7Days float64 `json:"filteredBidRate7Days,omitempty"` + // MustBidRateCurrentMonth: Must bid rate for current month. + MustBidRateCurrentMonth float64 `json:"mustBidRateCurrentMonth,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdImpressions7Days") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdImpressions7Days") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RtbMetrics) MarshalJSON() ([]byte, error) { + type NoMethod RtbMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *RtbMetrics) UnmarshalJSON(data []byte) error { + type NoMethod RtbMetrics + var s1 struct { + BidRate7Days gensupport.JSONFloat64 `json:"bidRate7Days"` + FilteredBidRate7Days gensupport.JSONFloat64 `json:"filteredBidRate7Days"` + MustBidRateCurrentMonth gensupport.JSONFloat64 `json:"mustBidRateCurrentMonth"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BidRate7Days = float64(s1.BidRate7Days) + s.FilteredBidRate7Days = float64(s1.FilteredBidRate7Days) + s.MustBidRateCurrentMonth = float64(s1.MustBidRateCurrentMonth) + return nil +} + +// SendRfpRequest: Request to send an RFP. All fields in this request are +// proposed to publisher and subject to changes by publisher during later +// negotiation. +type SendRfpRequest struct { + // BuyerContacts: Contact information for the buyer. + BuyerContacts []*Contact `json:"buyerContacts,omitempty"` + // Client: If the current buyer is sending the RFP on behalf of its client, use + // this field to specify the name of the client in the format: + // `buyers/{accountId}/clients/{clientAccountid}`. + Client string `json:"client,omitempty"` + // DisplayName: Required. The display name of the proposal being created by + // this RFP. + DisplayName string `json:"displayName,omitempty"` + // EstimatedGrossSpend: Specified by buyers in request for proposal (RFP) to + // notify publisher the total estimated spend for the proposal. Publishers will + // receive this information and send back proposed deals accordingly. + EstimatedGrossSpend *Money `json:"estimatedGrossSpend,omitempty"` + // FlightEndTime: Required. Proposed flight end time of the RFP. A timestamp in + // RFC3339 UTC "Zulu" format. Note that the specified value will be truncated + // to a granularity of one second. + FlightEndTime string `json:"flightEndTime,omitempty"` + // FlightStartTime: Required. Proposed flight start time of the RFP. A + // timestamp in RFC3339 UTC "Zulu" format. Note that the specified value will + // be truncated to a granularity of one second. + FlightStartTime string `json:"flightStartTime,omitempty"` + // GeoTargeting: Geo criteria IDs to be targeted. Refer to Geo tables. + GeoTargeting *CriteriaTargeting `json:"geoTargeting,omitempty"` + // InventorySizeTargeting: Inventory sizes to be targeted. + InventorySizeTargeting *InventorySizeTargeting `json:"inventorySizeTargeting,omitempty"` + // Note: A message that is sent to the publisher. Maximum length is 1024 + // characters. + Note string `json:"note,omitempty"` + // PreferredDealTerms: The terms for preferred deals. + PreferredDealTerms *PreferredDealTerms `json:"preferredDealTerms,omitempty"` + // ProgrammaticGuaranteedTerms: The terms for programmatic guaranteed deals. + ProgrammaticGuaranteedTerms *ProgrammaticGuaranteedTerms `json:"programmaticGuaranteedTerms,omitempty"` + // PublisherProfile: Required. The profile of the publisher who will receive + // this RFP in the format: + // `buyers/{accountId}/publisherProfiles/{publisherProfileId}`. + PublisherProfile string `json:"publisherProfile,omitempty"` + // ForceSendFields is a list of field names (e.g. "BuyerContacts") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BuyerContacts") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SendRfpRequest) MarshalJSON() ([]byte, error) { + type NoMethod SendRfpRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SetReadyToServeRequest: Request message for setting ready to serve for a +// finalized deal. +type SetReadyToServeRequest struct { +} + +// SubscribeAuctionPackageRequest: Request message for SubscribeAuctionPackage. +type SubscribeAuctionPackageRequest struct { +} + +// SubscribeClientsRequest: Request message for SubscribeAuctionPackageClients. +type SubscribeClientsRequest struct { + // Clients: Optional. A list of client buyers to subscribe to the auction + // package, with client buyer in the format + // `buyers/{accountId}/clients/{clientAccountId}`. The current buyer will be + // subscribed to the auction package regardless of the list contents if not + // already. + Clients []string `json:"clients,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clients") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clients") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SubscribeClientsRequest) MarshalJSON() ([]byte, error) { + type NoMethod SubscribeClientsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TechnologyTargeting: Represents targeting about various types of technology. +type TechnologyTargeting struct { + // DeviceCapabilityTargeting: IDs of device capabilities to be + // included/excluded. + DeviceCapabilityTargeting *CriteriaTargeting `json:"deviceCapabilityTargeting,omitempty"` + // DeviceCategoryTargeting: IDs of device categories to be included/excluded. + DeviceCategoryTargeting *CriteriaTargeting `json:"deviceCategoryTargeting,omitempty"` + // OperatingSystemTargeting: Operating system related targeting information. + OperatingSystemTargeting *OperatingSystemTargeting `json:"operatingSystemTargeting,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeviceCapabilityTargeting") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DeviceCapabilityTargeting") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TechnologyTargeting) MarshalJSON() ([]byte, error) { + type NoMethod TechnologyTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TimeOfDay: Represents a time of day. The date and time zone are either not +// significant or are specified elsewhere. An API may choose to allow leap +// seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. +type TimeOfDay struct { + // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may + // choose to allow the value "24:00:00" for scenarios like business closing + // time. + Hours int64 `json:"hours,omitempty"` + // Minutes: Minutes of hour of day. Must be from 0 to 59. + Minutes int64 `json:"minutes,omitempty"` + // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + Nanos int64 `json:"nanos,omitempty"` + // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An + // API may allow the value 60 if it allows leap-seconds. + Seconds int64 `json:"seconds,omitempty"` + // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Hours") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TimeOfDay) MarshalJSON() ([]byte, error) { + type NoMethod TimeOfDay + 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) +} + +// UnsubscribeAuctionPackageRequest: Request message for +// UnsubscribeAuctionPackage. +type UnsubscribeAuctionPackageRequest struct { +} + +// UnsubscribeClientsRequest: Request message for UnsubscribeAuctionPackage. +type UnsubscribeClientsRequest struct { + // Clients: Optional. A list of client buyers to unsubscribe from the auction + // package, with client buyer in the format + // `buyers/{accountId}/clients/{clientAccountId}`. + Clients []string `json:"clients,omitempty"` + // ForceSendFields is a list of field names (e.g. "Clients") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Clients") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s UnsubscribeClientsRequest) MarshalJSON() ([]byte, error) { + type NoMethod UnsubscribeClientsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// UpdateDealRequest: Request message for updating the deal at the given +// revision number. +type UpdateDealRequest struct { + // Deal: Required. The deal to update. The deal's `name` field is used to + // identify the deal to be updated. Note: proposal_revision will have to be + // provided within the resource or else an error will be thrown. Format: + // buyers/{accountId}/proposals/{proposalId}/deals/{dealId} + Deal *Deal `json:"deal,omitempty"` + // UpdateMask: List of fields to be updated. If empty or unspecified, the + // service will update all fields populated in the update request excluding the + // output only fields and primitive fields with default value. Note that + // explicit field mask is required in order to reset a primitive field back to + // its default value, for example, false for boolean fields, 0 for integer + // fields. A special field mask consisting of a single path "*" can be used to + // indicate full replacement(the equivalent of PUT method), updatable fields + // unset or unspecified in the input will be cleared or set to default value. + // Output only fields will be ignored regardless of the value of updateMask. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Deal") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Deal") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s UpdateDealRequest) MarshalJSON() ([]byte, error) { + type NoMethod UpdateDealRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// UriTargeting: Represents a list of targeted and excluded URLs (for example, +// google.com). For Private Auction Deals, URLs are either included or +// excluded. For Programmatic Guaranteed and Preferred Deals, this doesn't +// apply. +type UriTargeting struct { + // ExcludedUris: A list of URLs to be excluded. + ExcludedUris []string `json:"excludedUris,omitempty"` + // TargetedUris: A list of URLs to be included. + TargetedUris []string `json:"targetedUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludedUris") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExcludedUris") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s UriTargeting) MarshalJSON() ([]byte, error) { + type NoMethod UriTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// VideoTargeting: Represents targeting information about video. +type VideoTargeting struct { + // ExcludedPositionTypes: A list of video positions to be excluded. When this + // field is populated, the targeted_position_types field must be empty. + // + // Possible values: + // "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video + // position. + // "PREROLL" - Ad is played before the video. + // "MIDROLL" - Ad is played during the video. + // "POSTROLL" - Ad is played after the video. + ExcludedPositionTypes []string `json:"excludedPositionTypes,omitempty"` + // TargetedPositionTypes: A list of video positions to be included. When this + // field is populated, the excluded_position_types field must be empty. + // + // Possible values: + // "POSITION_TYPE_UNSPECIFIED" - A placeholder for an undefined video + // position. + // "PREROLL" - Ad is played before the video. + // "MIDROLL" - Ad is played during the video. + // "POSTROLL" - Ad is played after the video. + TargetedPositionTypes []string `json:"targetedPositionTypes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExcludedPositionTypes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExcludedPositionTypes") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s VideoTargeting) MarshalJSON() ([]byte, error) { + type NoMethod VideoTargeting + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type BiddersAuctionPackagesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the auction packages. Buyers can use the URL path +// "/v1alpha/buyers/{accountId}/auctionPackages" to list auction packages for +// the current buyer and its clients. Bidders can use the URL path +// "/v1alpha/bidders/{accountId}/auctionPackages" to list auction packages for +// the bidder, its media planners, its buyers, and all their clients. +// +// - parent: Name of the parent buyer that can access the auction package. +// Format: `buyers/{accountId}`. When used with a bidder account, the auction +// packages that the bidder, its media planners, its buyers and clients are +// subscribed to will be listed, in the format `bidders/{accountId}`. +func (r *BiddersAuctionPackagesService) List(parent string) *BiddersAuctionPackagesListCall { + c := &BiddersAuctionPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// Cloud API list filtering syntax +// (/authorized-buyers/apis/guides/list-filters). Only supported when parent is +// bidder. Supported columns for filtering are: * displayName * createTime * +// updateTime * eligibleSeatIds +func (c *BiddersAuctionPackagesListCall) Filter(filter string) *BiddersAuctionPackagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": An optional query string to +// sort auction packages using the Cloud API sorting syntax +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no +// sort order is specified, results will be returned in an arbitrary order. +// Only supported when parent is bidder. Supported columns for sorting are: * +// displayName * createTime * updateTime +func (c *BiddersAuctionPackagesListCall) OrderBy(orderBy string) *BiddersAuctionPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. Max allowed page size is +// 500. +func (c *BiddersAuctionPackagesListCall) PageSize(pageSize int64) *BiddersAuctionPackagesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned. ListAuctionPackagesResponse.nextPageToken +func (c *BiddersAuctionPackagesListCall) PageToken(pageToken string) *BiddersAuctionPackagesListCall { + 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 *BiddersAuctionPackagesListCall) Fields(s ...googleapi.Field) *BiddersAuctionPackagesListCall { + 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 *BiddersAuctionPackagesListCall) IfNoneMatch(entityTag string) *BiddersAuctionPackagesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BiddersAuctionPackagesListCall) Context(ctx context.Context) *BiddersAuctionPackagesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BiddersAuctionPackagesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BiddersAuctionPackagesListCall) 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}/auctionPackages") + 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 "authorizedbuyersmarketplace.bidders.auctionPackages.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAuctionPackagesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BiddersAuctionPackagesListCall) Do(opts ...googleapi.CallOption) (*ListAuctionPackagesResponse, 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 := &ListAuctionPackagesResponse{ + 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 *BiddersAuctionPackagesListCall) Pages(ctx context.Context, f func(*ListAuctionPackagesResponse) 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 BiddersFinalizedDealsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists finalized deals. Use the URL path +// "/v1alpha/buyers/{accountId}/finalizedDeals" to list finalized deals for the +// current buyer and its clients. Bidders can use the URL path +// "/v1alpha/bidders/{accountId}/finalizedDeals" to list finalized deals for +// the bidder, its buyers and all their clients. +// +// - parent: The buyer to list the finalized deals for, in the format: +// `buyers/{accountId}`. When used to list finalized deals for a bidder, its +// buyers and clients, in the format `bidders/{accountId}`. +func (r *BiddersFinalizedDealsService) List(parent string) *BiddersFinalizedDealsListCall { + c := &BiddersFinalizedDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// Cloud API list filtering syntax +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// Supported columns for filtering are: * deal.displayName * deal.dealType * +// deal.createTime * deal.updateTime * deal.flightStartTime * +// deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus +func (c *BiddersFinalizedDealsListCall) Filter(filter string) *BiddersFinalizedDealsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": An optional query string to +// sort finalized deals using the Cloud API sorting syntax +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no +// sort order is specified, results will be returned in an arbitrary order. +// Supported columns for sorting are: * deal.displayName * deal.createTime * +// deal.updateTime * deal.flightStartTime * deal.flightEndTime * +// rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days * +// rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days * +// rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth +func (c *BiddersFinalizedDealsListCall) OrderBy(orderBy string) *BiddersFinalizedDealsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. If requested more than 500, +// the server will return 500 results per page. If unspecified, the server will +// pick a default page size of 100. +func (c *BiddersFinalizedDealsListCall) PageSize(pageSize int64) *BiddersFinalizedDealsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned from ListFinalizedDealsResponse. +func (c *BiddersFinalizedDealsListCall) PageToken(pageToken string) *BiddersFinalizedDealsListCall { + 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 *BiddersFinalizedDealsListCall) Fields(s ...googleapi.Field) *BiddersFinalizedDealsListCall { + 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 *BiddersFinalizedDealsListCall) IfNoneMatch(entityTag string) *BiddersFinalizedDealsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BiddersFinalizedDealsListCall) Context(ctx context.Context) *BiddersFinalizedDealsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BiddersFinalizedDealsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BiddersFinalizedDealsListCall) 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}/finalizedDeals") + 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 "authorizedbuyersmarketplace.bidders.finalizedDeals.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListFinalizedDealsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BiddersFinalizedDealsListCall) Do(opts ...googleapi.CallOption) (*ListFinalizedDealsResponse, 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 := &ListFinalizedDealsResponse{ + 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 *BiddersFinalizedDealsListCall) Pages(ctx context.Context, f func(*ListFinalizedDealsResponse) 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 BuyersAuctionPackagesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets an auction package given its name. +// +// - name: Name of auction package to get. Format: +// `buyers/{accountId}/auctionPackages/{auctionPackageId}`. +func (r *BuyersAuctionPackagesService) Get(name string) *BuyersAuctionPackagesGetCall { + c := &BuyersAuctionPackagesGetCall{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 *BuyersAuctionPackagesGetCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesGetCall { + 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 *BuyersAuctionPackagesGetCall) IfNoneMatch(entityTag string) *BuyersAuctionPackagesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesGetCall) Context(ctx context.Context) *BuyersAuctionPackagesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesGetCall) 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 "authorizedbuyersmarketplace.buyers.auctionPackages.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AuctionPackage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesGetCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, 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 := &AuctionPackage{ + 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 BuyersAuctionPackagesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the auction packages. Buyers can use the URL path +// "/v1alpha/buyers/{accountId}/auctionPackages" to list auction packages for +// the current buyer and its clients. Bidders can use the URL path +// "/v1alpha/bidders/{accountId}/auctionPackages" to list auction packages for +// the bidder, its media planners, its buyers, and all their clients. +// +// - parent: Name of the parent buyer that can access the auction package. +// Format: `buyers/{accountId}`. When used with a bidder account, the auction +// packages that the bidder, its media planners, its buyers and clients are +// subscribed to will be listed, in the format `bidders/{accountId}`. +func (r *BuyersAuctionPackagesService) List(parent string) *BuyersAuctionPackagesListCall { + c := &BuyersAuctionPackagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// Cloud API list filtering syntax +// (/authorized-buyers/apis/guides/list-filters). Only supported when parent is +// bidder. Supported columns for filtering are: * displayName * createTime * +// updateTime * eligibleSeatIds +func (c *BuyersAuctionPackagesListCall) Filter(filter string) *BuyersAuctionPackagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": An optional query string to +// sort auction packages using the Cloud API sorting syntax +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no +// sort order is specified, results will be returned in an arbitrary order. +// Only supported when parent is bidder. Supported columns for sorting are: * +// displayName * createTime * updateTime +func (c *BuyersAuctionPackagesListCall) OrderBy(orderBy string) *BuyersAuctionPackagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. Max allowed page size is +// 500. +func (c *BuyersAuctionPackagesListCall) PageSize(pageSize int64) *BuyersAuctionPackagesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned. ListAuctionPackagesResponse.nextPageToken +func (c *BuyersAuctionPackagesListCall) PageToken(pageToken string) *BuyersAuctionPackagesListCall { + 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 *BuyersAuctionPackagesListCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesListCall { + 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 *BuyersAuctionPackagesListCall) IfNoneMatch(entityTag string) *BuyersAuctionPackagesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesListCall) Context(ctx context.Context) *BuyersAuctionPackagesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesListCall) 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}/auctionPackages") + 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 "authorizedbuyersmarketplace.buyers.auctionPackages.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAuctionPackagesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesListCall) Do(opts ...googleapi.CallOption) (*ListAuctionPackagesResponse, 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 := &ListAuctionPackagesResponse{ + 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 *BuyersAuctionPackagesListCall) Pages(ctx context.Context, f func(*ListAuctionPackagesResponse) 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 BuyersAuctionPackagesSubscribeCall struct { + s *Service + name string + subscribeauctionpackagerequest *SubscribeAuctionPackageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Subscribe: Subscribe to the auction package for the specified buyer. Once +// subscribed, the bidder will receive a call out for inventory matching the +// auction package targeting criteria with the auction package deal ID and the +// specified buyer. +// +// - name: Name of the auction package. Format: +// `buyers/{accountId}/auctionPackages/{auctionPackageId}`. +func (r *BuyersAuctionPackagesService) Subscribe(name string, subscribeauctionpackagerequest *SubscribeAuctionPackageRequest) *BuyersAuctionPackagesSubscribeCall { + c := &BuyersAuctionPackagesSubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.subscribeauctionpackagerequest = subscribeauctionpackagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersAuctionPackagesSubscribeCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesSubscribeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesSubscribeCall) Context(ctx context.Context) *BuyersAuctionPackagesSubscribeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesSubscribeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesSubscribeCall) 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.subscribeauctionpackagerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:subscribe") + 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 "authorizedbuyersmarketplace.buyers.auctionPackages.subscribe" call. +// Any non-2xx status code is an error. Response headers are in either +// *AuctionPackage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesSubscribeCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, 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 := &AuctionPackage{ + 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 BuyersAuctionPackagesSubscribeClientsCall struct { + s *Service + auctionPackage string + subscribeclientsrequest *SubscribeClientsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SubscribeClients: Subscribe the specified clients of the buyer to the +// auction package. If a client in the list does not belong to the buyer, an +// error response will be returned, and all of the following clients in the +// list will not be subscribed. Subscribing an already subscribed client will +// have no effect. +// +// - auctionPackage: Name of the auction package. Format: +// `buyers/{accountId}/auctionPackages/{auctionPackageId}`. +func (r *BuyersAuctionPackagesService) SubscribeClients(auctionPackage string, subscribeclientsrequest *SubscribeClientsRequest) *BuyersAuctionPackagesSubscribeClientsCall { + c := &BuyersAuctionPackagesSubscribeClientsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.auctionPackage = auctionPackage + c.subscribeclientsrequest = subscribeclientsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersAuctionPackagesSubscribeClientsCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesSubscribeClientsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesSubscribeClientsCall) Context(ctx context.Context) *BuyersAuctionPackagesSubscribeClientsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesSubscribeClientsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesSubscribeClientsCall) 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.subscribeclientsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+auctionPackage}:subscribeClients") + 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{ + "auctionPackage": c.auctionPackage, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.subscribeClients" call. +// Any non-2xx status code is an error. Response headers are in either +// *AuctionPackage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesSubscribeClientsCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, 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 := &AuctionPackage{ + 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 BuyersAuctionPackagesUnsubscribeCall struct { + s *Service + name string + unsubscribeauctionpackagerequest *UnsubscribeAuctionPackageRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Unsubscribe: Unsubscribe from the auction package for the specified buyer. +// Once unsubscribed, the bidder will no longer receive a call out for the +// auction package deal ID and the specified buyer. +// +// - name: Name of the auction package. Format: +// `buyers/{accountId}/auctionPackages/{auctionPackageId}`. +func (r *BuyersAuctionPackagesService) Unsubscribe(name string, unsubscribeauctionpackagerequest *UnsubscribeAuctionPackageRequest) *BuyersAuctionPackagesUnsubscribeCall { + c := &BuyersAuctionPackagesUnsubscribeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.unsubscribeauctionpackagerequest = unsubscribeauctionpackagerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersAuctionPackagesUnsubscribeCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesUnsubscribeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesUnsubscribeCall) Context(ctx context.Context) *BuyersAuctionPackagesUnsubscribeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesUnsubscribeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesUnsubscribeCall) 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.unsubscribeauctionpackagerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:unsubscribe") + 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 "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribe" call. +// Any non-2xx status code is an error. Response headers are in either +// *AuctionPackage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesUnsubscribeCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, 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 := &AuctionPackage{ + 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 BuyersAuctionPackagesUnsubscribeClientsCall struct { + s *Service + auctionPackage string + unsubscribeclientsrequest *UnsubscribeClientsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UnsubscribeClients: Unsubscribe from the auction package for the specified +// clients of the buyer. Unsubscribing a client that is not subscribed will +// have no effect. +// +// - auctionPackage: Name of the auction package. Format: +// `buyers/{accountId}/auctionPackages/{auctionPackageId}`. +func (r *BuyersAuctionPackagesService) UnsubscribeClients(auctionPackage string, unsubscribeclientsrequest *UnsubscribeClientsRequest) *BuyersAuctionPackagesUnsubscribeClientsCall { + c := &BuyersAuctionPackagesUnsubscribeClientsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.auctionPackage = auctionPackage + c.unsubscribeclientsrequest = unsubscribeclientsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Fields(s ...googleapi.Field) *BuyersAuctionPackagesUnsubscribeClientsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Context(ctx context.Context) *BuyersAuctionPackagesUnsubscribeClientsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersAuctionPackagesUnsubscribeClientsCall) 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.unsubscribeclientsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+auctionPackage}:unsubscribeClients") + 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{ + "auctionPackage": c.auctionPackage, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribeClients" call. +// Any non-2xx status code is an error. Response headers are in either +// *AuctionPackage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersAuctionPackagesUnsubscribeClientsCall) Do(opts ...googleapi.CallOption) (*AuctionPackage, 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 := &AuctionPackage{ + 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 BuyersClientsActivateCall struct { + s *Service + name string + activateclientrequest *ActivateClientRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Activate: Activates an existing client. The state of the client will be +// updated to "ACTIVE". This method has no effect if the client is already in +// "ACTIVE" state. +// +// - name: Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`. +func (r *BuyersClientsService) Activate(name string, activateclientrequest *ActivateClientRequest) *BuyersClientsActivateCall { + c := &BuyersClientsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.activateclientrequest = activateclientrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsActivateCall) Fields(s ...googleapi.Field) *BuyersClientsActivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsActivateCall) Context(ctx context.Context) *BuyersClientsActivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsActivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsActivateCall) 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.activateclientrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.clients.activate" call. +// Any non-2xx status code is an error. Response headers are in either +// *Client.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsActivateCall) Do(opts ...googleapi.CallOption) (*Client, 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 := &Client{ + 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 BuyersClientsCreateCall struct { + s *Service + parent string + client *Client + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new client. +// +// - parent: The name of the buyer. Format: `buyers/{accountId}`. +func (r *BuyersClientsService) Create(parent string, client *Client) *BuyersClientsCreateCall { + c := &BuyersClientsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.client = client + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsCreateCall) Fields(s ...googleapi.Field) *BuyersClientsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsCreateCall) Context(ctx context.Context) *BuyersClientsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsCreateCall) 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.client) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/clients") + 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 "authorizedbuyersmarketplace.buyers.clients.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Client.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsCreateCall) Do(opts ...googleapi.CallOption) (*Client, 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 := &Client{ + 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 BuyersClientsDeactivateCall struct { + s *Service + name string + deactivateclientrequest *DeactivateClientRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deactivate: Deactivates an existing client. The state of the client will be +// updated to "INACTIVE". This method has no effect if the client is already in +// "INACTIVE" state. +// +// - name: Format: `buyers/{buyerAccountId}/clients/{clientAccountId}`. +func (r *BuyersClientsService) Deactivate(name string, deactivateclientrequest *DeactivateClientRequest) *BuyersClientsDeactivateCall { + c := &BuyersClientsDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deactivateclientrequest = deactivateclientrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsDeactivateCall) Fields(s ...googleapi.Field) *BuyersClientsDeactivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsDeactivateCall) Context(ctx context.Context) *BuyersClientsDeactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsDeactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsDeactivateCall) 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.deactivateclientrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:deactivate") + 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 "authorizedbuyersmarketplace.buyers.clients.deactivate" call. +// Any non-2xx status code is an error. Response headers are in either +// *Client.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsDeactivateCall) Do(opts ...googleapi.CallOption) (*Client, 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 := &Client{ + 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 BuyersClientsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a client with a given resource name. +// +// - name: Format: `buyers/{accountId}/clients/{clientAccountId}`. +func (r *BuyersClientsService) Get(name string) *BuyersClientsGetCall { + c := &BuyersClientsGetCall{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 *BuyersClientsGetCall) Fields(s ...googleapi.Field) *BuyersClientsGetCall { + 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 *BuyersClientsGetCall) IfNoneMatch(entityTag string) *BuyersClientsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsGetCall) Context(ctx context.Context) *BuyersClientsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsGetCall) 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 "authorizedbuyersmarketplace.buyers.clients.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Client.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsGetCall) Do(opts ...googleapi.CallOption) (*Client, 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 := &Client{ + 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 BuyersClientsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the clients for the current buyer. +// +// - parent: The name of the buyer. Format: `buyers/{accountId}`. +func (r *BuyersClientsService) List(parent string) *BuyersClientsListCall { + c := &BuyersClientsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Query string using the +// Filtering Syntax +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// Supported fields for filtering are: * partnerClientId Use this field to +// filter the clients by the partnerClientId. For example, if the +// partnerClientId of the client is "1234", the value of this field should be +// `partnerClientId = "1234", in order to get only the client whose +// partnerClientId is "1234" in the response. +func (c *BuyersClientsListCall) Filter(filter string) *BuyersClientsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. If +// left blank, a default page size of 500 will be applied. +func (c *BuyersClientsListCall) PageSize(pageSize int64) *BuyersClientsListCall { + 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. Typically, this is the value of +// ListClientsResponse.nextPageToken returned from the previous call to the +// list method. +func (c *BuyersClientsListCall) PageToken(pageToken string) *BuyersClientsListCall { + 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 *BuyersClientsListCall) Fields(s ...googleapi.Field) *BuyersClientsListCall { + 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 *BuyersClientsListCall) IfNoneMatch(entityTag string) *BuyersClientsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsListCall) Context(ctx context.Context) *BuyersClientsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsListCall) 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}/clients") + 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 "authorizedbuyersmarketplace.buyers.clients.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListClientsResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *BuyersClientsListCall) Do(opts ...googleapi.CallOption) (*ListClientsResponse, 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 := &ListClientsResponse{ + 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 *BuyersClientsListCall) Pages(ctx context.Context, f func(*ListClientsResponse) 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 BuyersClientsPatchCall struct { + s *Service + name string + client *Client + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an existing client. +// +// - name: Output only. The resource name of the client. Format: +// `buyers/{accountId}/clients/{clientAccountId}`. +func (r *BuyersClientsService) Patch(name string, client *Client) *BuyersClientsPatchCall { + c := &BuyersClientsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.client = client + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields to be +// updated. If empty or unspecified, the service will update all fields +// populated in the update request excluding the output only fields and +// primitive fields with default value. Note that explicit field mask is +// required in order to reset a primitive field back to its default value, for +// example, false for boolean fields, 0 for integer fields. A special field +// mask consisting of a single path "*" can be used to indicate full +// replacement(the equivalent of PUT method), updatable fields unset or +// unspecified in the input will be cleared or set to default value. Output +// only fields will be ignored regardless of the value of updateMask. +func (c *BuyersClientsPatchCall) UpdateMask(updateMask string) *BuyersClientsPatchCall { + 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 *BuyersClientsPatchCall) Fields(s ...googleapi.Field) *BuyersClientsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsPatchCall) Context(ctx context.Context) *BuyersClientsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsPatchCall) 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.client) + 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 "authorizedbuyersmarketplace.buyers.clients.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Client.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsPatchCall) Do(opts ...googleapi.CallOption) (*Client, 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 := &Client{ + 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 BuyersClientsUsersActivateCall struct { + s *Service + name string + activateclientuserrequest *ActivateClientUserRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Activate: Activates an existing client user. The state of the client user +// will be updated from "INACTIVE" to "ACTIVE". This method has no effect if +// the client user is already in "ACTIVE" state. An error will be returned if +// the client user to activate is still in "INVITED" state. +// +// - name: Format: +// `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`. +func (r *BuyersClientsUsersService) Activate(name string, activateclientuserrequest *ActivateClientUserRequest) *BuyersClientsUsersActivateCall { + c := &BuyersClientsUsersActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.activateclientuserrequest = activateclientuserrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsUsersActivateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersActivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersActivateCall) Context(ctx context.Context) *BuyersClientsUsersActivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersActivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersActivateCall) 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.activateclientuserrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.clients.users.activate" call. +// Any non-2xx status code is an error. Response headers are in either +// *ClientUser.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsUsersActivateCall) Do(opts ...googleapi.CallOption) (*ClientUser, 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 := &ClientUser{ + 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 BuyersClientsUsersCreateCall struct { + s *Service + parent string + clientuser *ClientUser + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new client user in "INVITED" state. An email invitation +// will be sent to the new user, once accepted the user will become active. +// +// - parent: The name of the client. Format: +// `buyers/{accountId}/clients/{clientAccountId}`. +func (r *BuyersClientsUsersService) Create(parent string, clientuser *ClientUser) *BuyersClientsUsersCreateCall { + c := &BuyersClientsUsersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.clientuser = clientuser + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsUsersCreateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersCreateCall) Context(ctx context.Context) *BuyersClientsUsersCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersCreateCall) 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.clientuser) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/users") + 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 "authorizedbuyersmarketplace.buyers.clients.users.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *ClientUser.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsUsersCreateCall) Do(opts ...googleapi.CallOption) (*ClientUser, 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 := &ClientUser{ + 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 BuyersClientsUsersDeactivateCall struct { + s *Service + name string + deactivateclientuserrequest *DeactivateClientUserRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deactivate: Deactivates an existing client user. The state of the client +// user will be updated from "ACTIVE" to "INACTIVE". This method has no effect +// if the client user is already in "INACTIVE" state. An error will be returned +// if the client user to deactivate is still in "INVITED" state. +// +// - name: Format: +// `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`. +func (r *BuyersClientsUsersService) Deactivate(name string, deactivateclientuserrequest *DeactivateClientUserRequest) *BuyersClientsUsersDeactivateCall { + c := &BuyersClientsUsersDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deactivateclientuserrequest = deactivateclientuserrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersClientsUsersDeactivateCall) Fields(s ...googleapi.Field) *BuyersClientsUsersDeactivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersDeactivateCall) Context(ctx context.Context) *BuyersClientsUsersDeactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersDeactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersDeactivateCall) 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.deactivateclientuserrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:deactivate") + 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 "authorizedbuyersmarketplace.buyers.clients.users.deactivate" call. +// Any non-2xx status code is an error. Response headers are in either +// *ClientUser.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsUsersDeactivateCall) Do(opts ...googleapi.CallOption) (*ClientUser, 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 := &ClientUser{ + 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 BuyersClientsUsersDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an existing client user. The client user will lose access to +// the Authorized Buyers UI. Note that if a client user is deleted, the user's +// access to the UI can't be restored unless a new client user is created and +// activated. +// +// - name: Format: +// `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`. +func (r *BuyersClientsUsersService) Delete(name string) *BuyersClientsUsersDeleteCall { + c := &BuyersClientsUsersDeleteCall{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 *BuyersClientsUsersDeleteCall) Fields(s ...googleapi.Field) *BuyersClientsUsersDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersDeleteCall) Context(ctx context.Context) *BuyersClientsUsersDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersDeleteCall) 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, "v1alpha/{+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 "authorizedbuyersmarketplace.buyers.clients.users.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 *BuyersClientsUsersDeleteCall) 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 BuyersClientsUsersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Retrieves an existing client user. +// +// - name: Format: +// `buyers/{buyerAccountId}/clients/{clientAccountId}/clientUsers/{userId}`. +func (r *BuyersClientsUsersService) Get(name string) *BuyersClientsUsersGetCall { + c := &BuyersClientsUsersGetCall{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 *BuyersClientsUsersGetCall) Fields(s ...googleapi.Field) *BuyersClientsUsersGetCall { + 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 *BuyersClientsUsersGetCall) IfNoneMatch(entityTag string) *BuyersClientsUsersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersGetCall) Context(ctx context.Context) *BuyersClientsUsersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersGetCall) 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 "authorizedbuyersmarketplace.buyers.clients.users.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *ClientUser.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersClientsUsersGetCall) Do(opts ...googleapi.CallOption) (*ClientUser, 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 := &ClientUser{ + 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 BuyersClientsUsersListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all client users for a specified client. +// +// - parent: The name of the client. Format: +// `buyers/{buyerAccountId}/clients/{clientAccountId}`. +func (r *BuyersClientsUsersService) List(parent string) *BuyersClientsUsersListCall { + c := &BuyersClientsUsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. If +// left blank, a default page size of 500 will be applied. +func (c *BuyersClientsUsersListCall) PageSize(pageSize int64) *BuyersClientsUsersListCall { + 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. Typically, this is the value of +// ListClientUsersResponse.nextPageToken returned from the previous call to the +// list method. +func (c *BuyersClientsUsersListCall) PageToken(pageToken string) *BuyersClientsUsersListCall { + 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 *BuyersClientsUsersListCall) Fields(s ...googleapi.Field) *BuyersClientsUsersListCall { + 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 *BuyersClientsUsersListCall) IfNoneMatch(entityTag string) *BuyersClientsUsersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersClientsUsersListCall) Context(ctx context.Context) *BuyersClientsUsersListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersClientsUsersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersClientsUsersListCall) 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}/users") + 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 "authorizedbuyersmarketplace.buyers.clients.users.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListClientUsersResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersClientsUsersListCall) Do(opts ...googleapi.CallOption) (*ListClientUsersResponse, 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 := &ListClientUsersResponse{ + 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 *BuyersClientsUsersListCall) Pages(ctx context.Context, f func(*ListClientUsersResponse) 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 BuyersDataSegmentsActivateCall struct { + s *Service + name string + activatedatasegmentrequest *ActivateDataSegmentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Activate: Activates a data segment. +// +// - name: Name of data segment to activate. Format: +// `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`. +func (r *BuyersDataSegmentsService) Activate(name string, activatedatasegmentrequest *ActivateDataSegmentRequest) *BuyersDataSegmentsActivateCall { + c := &BuyersDataSegmentsActivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.activatedatasegmentrequest = activatedatasegmentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersDataSegmentsActivateCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsActivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsActivateCall) Context(ctx context.Context) *BuyersDataSegmentsActivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsActivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsActivateCall) 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.activatedatasegmentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.dataSegments.activate" call. +// Any non-2xx status code is an error. Response headers are in either +// *DataSegment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersDataSegmentsActivateCall) Do(opts ...googleapi.CallOption) (*DataSegment, 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 := &DataSegment{ + 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 BuyersDataSegmentsCreateCall struct { + s *Service + parent string + datasegment *DataSegment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a data segment owned by the listed curator. The data segment +// will be created in the `ACTIVE` state, meaning it will be immediately +// available for buyers to use in preferred deals, private auction deals, and +// auction packages. +// +// - parent: The parent resource where this data segment will be created. +// Format: `buyers/{accountId}`. +func (r *BuyersDataSegmentsService) Create(parent string, datasegment *DataSegment) *BuyersDataSegmentsCreateCall { + c := &BuyersDataSegmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.datasegment = datasegment + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersDataSegmentsCreateCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsCreateCall) Context(ctx context.Context) *BuyersDataSegmentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsCreateCall) 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.datasegment) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataSegments") + 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 "authorizedbuyersmarketplace.buyers.dataSegments.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *DataSegment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersDataSegmentsCreateCall) Do(opts ...googleapi.CallOption) (*DataSegment, 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 := &DataSegment{ + 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 BuyersDataSegmentsDeactivateCall struct { + s *Service + name string + deactivatedatasegmentrequest *DeactivateDataSegmentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deactivate: Deactivates a data segment. +// +// - name: Name of data segment to deactivate. Format: +// `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`. +func (r *BuyersDataSegmentsService) Deactivate(name string, deactivatedatasegmentrequest *DeactivateDataSegmentRequest) *BuyersDataSegmentsDeactivateCall { + c := &BuyersDataSegmentsDeactivateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deactivatedatasegmentrequest = deactivatedatasegmentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersDataSegmentsDeactivateCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsDeactivateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsDeactivateCall) Context(ctx context.Context) *BuyersDataSegmentsDeactivateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsDeactivateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsDeactivateCall) 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.deactivatedatasegmentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:deactivate") + 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 "authorizedbuyersmarketplace.buyers.dataSegments.deactivate" call. +// Any non-2xx status code is an error. Response headers are in either +// *DataSegment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersDataSegmentsDeactivateCall) Do(opts ...googleapi.CallOption) (*DataSegment, 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 := &DataSegment{ + 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 BuyersDataSegmentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a data segment given its name. +// +// - name: Name of data segment to get. Format: +// `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`. +func (r *BuyersDataSegmentsService) Get(name string) *BuyersDataSegmentsGetCall { + c := &BuyersDataSegmentsGetCall{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 *BuyersDataSegmentsGetCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsGetCall { + 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 *BuyersDataSegmentsGetCall) IfNoneMatch(entityTag string) *BuyersDataSegmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsGetCall) Context(ctx context.Context) *BuyersDataSegmentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsGetCall) 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 "authorizedbuyersmarketplace.buyers.dataSegments.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *DataSegment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersDataSegmentsGetCall) Do(opts ...googleapi.CallOption) (*DataSegment, 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 := &DataSegment{ + 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 BuyersDataSegmentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List the data segments owned by a curator. +// +// - parent: Name of the parent buyer that can access the data segment. Format: +// `buyers/{accountId}`. +func (r *BuyersDataSegmentsService) List(parent string) *BuyersDataSegmentsListCall { + c := &BuyersDataSegmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. Max allowed page size is +// 500. If unspecified, the server will default to 500. +func (c *BuyersDataSegmentsListCall) PageSize(pageSize int64) *BuyersDataSegmentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned. ListDataSegmentsResponse.nextPageToken +func (c *BuyersDataSegmentsListCall) PageToken(pageToken string) *BuyersDataSegmentsListCall { + 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 *BuyersDataSegmentsListCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsListCall { + 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 *BuyersDataSegmentsListCall) IfNoneMatch(entityTag string) *BuyersDataSegmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsListCall) Context(ctx context.Context) *BuyersDataSegmentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsListCall) 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}/dataSegments") + 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 "authorizedbuyersmarketplace.buyers.dataSegments.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListDataSegmentsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersDataSegmentsListCall) Do(opts ...googleapi.CallOption) (*ListDataSegmentsResponse, 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 := &ListDataSegmentsResponse{ + 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 *BuyersDataSegmentsListCall) Pages(ctx context.Context, f func(*ListDataSegmentsResponse) 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 BuyersDataSegmentsPatchCall struct { + s *Service + nameid string + datasegment *DataSegment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a data segment. +// +// - name: Immutable. Identifier. The unique identifier for the data segment. +// Account ID corresponds to the account ID that created the segment. Format: +// `buyers/{accountId}/dataSegments/{curatorDataSegmentId}`. +func (r *BuyersDataSegmentsService) Patch(nameid string, datasegment *DataSegment) *BuyersDataSegmentsPatchCall { + c := &BuyersDataSegmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.datasegment = datasegment + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields to be +// updated. If empty or unspecified, the service will update all fields +// populated in the update request excluding the output only fields and +// primitive fields with default value. Note that explicit field mask is +// required in order to reset a primitive field back to its default value, for +// example, false for boolean fields, 0 for integer fields. A special field +// mask consisting of a single path "*" can be used to indicate full +// replacement(the equivalent of PUT method), updatable fields unset or +// unspecified in the input will be cleared or set to default value. Output +// only fields will be ignored regardless of the value of updateMask. +func (c *BuyersDataSegmentsPatchCall) UpdateMask(updateMask string) *BuyersDataSegmentsPatchCall { + 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 *BuyersDataSegmentsPatchCall) Fields(s ...googleapi.Field) *BuyersDataSegmentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersDataSegmentsPatchCall) Context(ctx context.Context) *BuyersDataSegmentsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersDataSegmentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersDataSegmentsPatchCall) 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.datasegment) + 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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.dataSegments.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *DataSegment.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersDataSegmentsPatchCall) Do(opts ...googleapi.CallOption) (*DataSegment, 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 := &DataSegment{ + 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 BuyersFinalizedDealsAddCreativeCall struct { + s *Service + deal string + addcreativerequest *AddCreativeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddCreative: Add creative to be used in the bidding process for a finalized +// deal. For programmatic guaranteed deals, it's recommended that you associate +// at least one approved creative with the deal before calling SetReadyToServe, +// to help reduce the number of bid responses filtered because they don't +// contain approved creatives. Creatives successfully added to a deal can be +// found in the Realtime-bidding Creatives API creative.deal_ids. This method +// only applies to programmatic guaranteed deals. Maximum number of 1000 +// creatives can be added to a finalized deal. +// +// - deal: Name of the finalized deal in the format of: +// `buyers/{accountId}/finalizedDeals/{dealId}`. +func (r *BuyersFinalizedDealsService) AddCreative(deal string, addcreativerequest *AddCreativeRequest) *BuyersFinalizedDealsAddCreativeCall { + c := &BuyersFinalizedDealsAddCreativeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.deal = deal + c.addcreativerequest = addcreativerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersFinalizedDealsAddCreativeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsAddCreativeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsAddCreativeCall) Context(ctx context.Context) *BuyersFinalizedDealsAddCreativeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsAddCreativeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsAddCreativeCall) 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.addcreativerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+deal}:addCreative") + 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{ + "deal": c.deal, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.addCreative" call. +// Any non-2xx status code is an error. Response headers are in either +// *FinalizedDeal.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsAddCreativeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, 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 := &FinalizedDeal{ + 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 BuyersFinalizedDealsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a finalized deal given its name. +// +// - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. +func (r *BuyersFinalizedDealsService) Get(name string) *BuyersFinalizedDealsGetCall { + c := &BuyersFinalizedDealsGetCall{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 *BuyersFinalizedDealsGetCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsGetCall { + 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 *BuyersFinalizedDealsGetCall) IfNoneMatch(entityTag string) *BuyersFinalizedDealsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsGetCall) Context(ctx context.Context) *BuyersFinalizedDealsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsGetCall) 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 "authorizedbuyersmarketplace.buyers.finalizedDeals.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *FinalizedDeal.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsGetCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, 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 := &FinalizedDeal{ + 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 BuyersFinalizedDealsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists finalized deals. Use the URL path +// "/v1alpha/buyers/{accountId}/finalizedDeals" to list finalized deals for the +// current buyer and its clients. Bidders can use the URL path +// "/v1alpha/bidders/{accountId}/finalizedDeals" to list finalized deals for +// the bidder, its buyers and all their clients. +// +// - parent: The buyer to list the finalized deals for, in the format: +// `buyers/{accountId}`. When used to list finalized deals for a bidder, its +// buyers and clients, in the format `bidders/{accountId}`. +func (r *BuyersFinalizedDealsService) List(parent string) *BuyersFinalizedDealsListCall { + c := &BuyersFinalizedDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// Cloud API list filtering syntax +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// Supported columns for filtering are: * deal.displayName * deal.dealType * +// deal.createTime * deal.updateTime * deal.flightStartTime * +// deal.flightEndTime * deal.eligibleSeatIds * dealServingStatus +func (c *BuyersFinalizedDealsListCall) Filter(filter string) *BuyersFinalizedDealsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": An optional query string to +// sort finalized deals using the Cloud API sorting syntax +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If no +// sort order is specified, results will be returned in an arbitrary order. +// Supported columns for sorting are: * deal.displayName * deal.createTime * +// deal.updateTime * deal.flightStartTime * deal.flightEndTime * +// rtbMetrics.bidRequests7Days * rtbMetrics.bids7Days * +// rtbMetrics.adImpressions7Days * rtbMetrics.bidRate7Days * +// rtbMetrics.filteredBidRate7Days * rtbMetrics.mustBidRateCurrentMonth +func (c *BuyersFinalizedDealsListCall) OrderBy(orderBy string) *BuyersFinalizedDealsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. If requested more than 500, +// the server will return 500 results per page. If unspecified, the server will +// pick a default page size of 100. +func (c *BuyersFinalizedDealsListCall) PageSize(pageSize int64) *BuyersFinalizedDealsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned from ListFinalizedDealsResponse. +func (c *BuyersFinalizedDealsListCall) PageToken(pageToken string) *BuyersFinalizedDealsListCall { + 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 *BuyersFinalizedDealsListCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsListCall { + 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 *BuyersFinalizedDealsListCall) IfNoneMatch(entityTag string) *BuyersFinalizedDealsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsListCall) Context(ctx context.Context) *BuyersFinalizedDealsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsListCall) 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}/finalizedDeals") + 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 "authorizedbuyersmarketplace.buyers.finalizedDeals.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListFinalizedDealsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsListCall) Do(opts ...googleapi.CallOption) (*ListFinalizedDealsResponse, 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 := &ListFinalizedDealsResponse{ + 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 *BuyersFinalizedDealsListCall) Pages(ctx context.Context, f func(*ListFinalizedDealsResponse) 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 BuyersFinalizedDealsPauseCall struct { + s *Service + name string + pausefinalizeddealrequest *PauseFinalizedDealRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Pause: Pauses serving of the given finalized deal. This call only pauses the +// serving status, and does not affect other fields of the finalized deal. +// Calling this method for an already paused deal has no effect. This method +// only applies to programmatic guaranteed deals and preferred deals. +// +// - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. +func (r *BuyersFinalizedDealsService) Pause(name string, pausefinalizeddealrequest *PauseFinalizedDealRequest) *BuyersFinalizedDealsPauseCall { + c := &BuyersFinalizedDealsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.pausefinalizeddealrequest = pausefinalizeddealrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersFinalizedDealsPauseCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsPauseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsPauseCall) Context(ctx context.Context) *BuyersFinalizedDealsPauseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsPauseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsPauseCall) 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.pausefinalizeddealrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.pause" call. +// Any non-2xx status code is an error. Response headers are in either +// *FinalizedDeal.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsPauseCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, 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 := &FinalizedDeal{ + 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 BuyersFinalizedDealsResumeCall struct { + s *Service + name string + resumefinalizeddealrequest *ResumeFinalizedDealRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Resume: Resumes serving of the given finalized deal. Calling this method for +// an running deal has no effect. If a deal is initially paused by the seller, +// calling this method will not resume serving of the deal until the seller +// also resumes the deal. This method only applies to programmatic guaranteed +// deals and preferred deals. +// +// - name: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. +func (r *BuyersFinalizedDealsService) Resume(name string, resumefinalizeddealrequest *ResumeFinalizedDealRequest) *BuyersFinalizedDealsResumeCall { + c := &BuyersFinalizedDealsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.resumefinalizeddealrequest = resumefinalizeddealrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersFinalizedDealsResumeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsResumeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsResumeCall) Context(ctx context.Context) *BuyersFinalizedDealsResumeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsResumeCall) 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.resumefinalizeddealrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") + 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 "authorizedbuyersmarketplace.buyers.finalizedDeals.resume" call. +// Any non-2xx status code is an error. Response headers are in either +// *FinalizedDeal.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsResumeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, 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 := &FinalizedDeal{ + 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 BuyersFinalizedDealsSetReadyToServeCall struct { + s *Service + deal string + setreadytoserverequest *SetReadyToServeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetReadyToServe: Sets the given finalized deal as ready to serve. By +// default, deals are set as ready to serve as soon as they're finalized. If +// you want to opt out of the default behavior, and manually indicate that +// deals are ready to serve, ask your Technical Account Manager to add you to +// the allowlist. If you choose to use this method, finalized deals belonging +// to the bidder and its child seats don't start serving until after you call +// `setReadyToServe`, and after the deals become active. For example, you can +// use this method to delay receiving bid requests until your creative is +// ready. This method only applies to programmatic guaranteed deals. +// +// - deal: Format: `buyers/{accountId}/finalizedDeals/{dealId}`. +func (r *BuyersFinalizedDealsService) SetReadyToServe(deal string, setreadytoserverequest *SetReadyToServeRequest) *BuyersFinalizedDealsSetReadyToServeCall { + c := &BuyersFinalizedDealsSetReadyToServeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.deal = deal + c.setreadytoserverequest = setreadytoserverequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersFinalizedDealsSetReadyToServeCall) Fields(s ...googleapi.Field) *BuyersFinalizedDealsSetReadyToServeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersFinalizedDealsSetReadyToServeCall) Context(ctx context.Context) *BuyersFinalizedDealsSetReadyToServeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersFinalizedDealsSetReadyToServeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersFinalizedDealsSetReadyToServeCall) 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.setreadytoserverequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+deal}:setReadyToServe") + 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{ + "deal": c.deal, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.finalizedDeals.setReadyToServe" call. +// Any non-2xx status code is an error. Response headers are in either +// *FinalizedDeal.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersFinalizedDealsSetReadyToServeCall) Do(opts ...googleapi.CallOption) (*FinalizedDeal, 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 := &FinalizedDeal{ + 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 BuyersProposalsAcceptCall struct { + s *Service + name string + acceptproposalrequest *AcceptProposalRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Accept: Accepts the proposal at the given revision number. If the revision +// number in the request is behind the latest from the server, an error message +// will be returned. This call updates the Proposal.state from +// `BUYER_ACCEPTANCE_REQUESTED` to `FINALIZED`; it has no side effect if the +// Proposal.state is already `FINALIZED` and throws exception if the +// Proposal.state is not either `BUYER_ACCEPTANCE_REQUESTED` or `FINALIZED`. +// Accepting a proposal means the buyer understands and accepts the +// Proposal.terms_and_conditions proposed by the seller. +// +// - name: Name of the proposal. Format: +// `buyers/{accountId}/proposals/{proposalId}`. +func (r *BuyersProposalsService) Accept(name string, acceptproposalrequest *AcceptProposalRequest) *BuyersProposalsAcceptCall { + c := &BuyersProposalsAcceptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.acceptproposalrequest = acceptproposalrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersProposalsAcceptCall) Fields(s ...googleapi.Field) *BuyersProposalsAcceptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsAcceptCall) Context(ctx context.Context) *BuyersProposalsAcceptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsAcceptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsAcceptCall) 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.acceptproposalrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:accept") + 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 "authorizedbuyersmarketplace.buyers.proposals.accept" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsAcceptCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsAddNoteCall struct { + s *Service + proposal string + addnoterequest *AddNoteRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddNote: Creates a note for this proposal and sends to the seller. This +// method is not supported for proposals with DealType set to +// 'PRIVATE_AUCTION'. +// +// - proposal: Name of the proposal. Format: +// `buyers/{accountId}/proposals/{proposalId}`. +func (r *BuyersProposalsService) AddNote(proposal string, addnoterequest *AddNoteRequest) *BuyersProposalsAddNoteCall { + c := &BuyersProposalsAddNoteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.proposal = proposal + c.addnoterequest = addnoterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersProposalsAddNoteCall) Fields(s ...googleapi.Field) *BuyersProposalsAddNoteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsAddNoteCall) Context(ctx context.Context) *BuyersProposalsAddNoteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsAddNoteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsAddNoteCall) 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.addnoterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+proposal}:addNote") + 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{ + "proposal": c.proposal, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.proposals.addNote" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsAddNoteCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsCancelNegotiationCall struct { + s *Service + proposal string + cancelnegotiationrequest *CancelNegotiationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelNegotiation: Cancels an ongoing negotiation on a proposal. This does +// not cancel or end serving for the deals if the proposal has been finalized. +// If the proposal has not been finalized before, calling this method will set +// the Proposal.state to `TERMINATED` and increment the +// Proposal.proposal_revision. If the proposal has been finalized before and is +// under renegotiation now, calling this method will reset the Proposal.state +// to `FINALIZED` and increment the Proposal.proposal_revision. This method +// does not support private auction proposals whose Proposal.deal_type is +// 'PRIVATE_AUCTION'. +// +// - proposal: Name of the proposal. Format: +// `buyers/{accountId}/proposals/{proposalId}`. +func (r *BuyersProposalsService) CancelNegotiation(proposal string, cancelnegotiationrequest *CancelNegotiationRequest) *BuyersProposalsCancelNegotiationCall { + c := &BuyersProposalsCancelNegotiationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.proposal = proposal + c.cancelnegotiationrequest = cancelnegotiationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersProposalsCancelNegotiationCall) Fields(s ...googleapi.Field) *BuyersProposalsCancelNegotiationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsCancelNegotiationCall) Context(ctx context.Context) *BuyersProposalsCancelNegotiationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsCancelNegotiationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsCancelNegotiationCall) 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.cancelnegotiationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+proposal}:cancelNegotiation") + 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{ + "proposal": c.proposal, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.proposals.cancelNegotiation" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsCancelNegotiationCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a proposal using its resource name. The proposal is returned at +// the latest revision. +// +// - name: Name of the proposal. Format: +// `buyers/{accountId}/proposals/{proposalId}`. +func (r *BuyersProposalsService) Get(name string) *BuyersProposalsGetCall { + c := &BuyersProposalsGetCall{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 *BuyersProposalsGetCall) Fields(s ...googleapi.Field) *BuyersProposalsGetCall { + 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 *BuyersProposalsGetCall) IfNoneMatch(entityTag string) *BuyersProposalsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsGetCall) Context(ctx context.Context) *BuyersProposalsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsGetCall) 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 "authorizedbuyersmarketplace.buyers.proposals.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsGetCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists proposals. A filter expression using Cloud API list filtering +// syntax +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// may be specified to filter the results. +// +// - parent: Parent that owns the collection of proposals Format: +// `buyers/{accountId}`. +func (r *BuyersProposalsService) List(parent string) *BuyersProposalsListCall { + c := &BuyersProposalsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// Cloud API list filtering syntax +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// Supported columns for filtering are: * displayName * dealType * updateTime * +// state +func (c *BuyersProposalsListCall) Filter(filter string) *BuyersProposalsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. If unspecified, the server +// will put a size of 500. +func (c *BuyersProposalsListCall) PageSize(pageSize int64) *BuyersProposalsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned from ListProposalsResponse. +func (c *BuyersProposalsListCall) PageToken(pageToken string) *BuyersProposalsListCall { + 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 *BuyersProposalsListCall) Fields(s ...googleapi.Field) *BuyersProposalsListCall { + 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 *BuyersProposalsListCall) IfNoneMatch(entityTag string) *BuyersProposalsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsListCall) Context(ctx context.Context) *BuyersProposalsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsListCall) 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}/proposals") + 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 "authorizedbuyersmarketplace.buyers.proposals.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListProposalsResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *BuyersProposalsListCall) Do(opts ...googleapi.CallOption) (*ListProposalsResponse, 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 := &ListProposalsResponse{ + 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 *BuyersProposalsListCall) Pages(ctx context.Context, f func(*ListProposalsResponse) 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 BuyersProposalsPatchCall struct { + s *Service + nameid string + proposal *Proposal + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the proposal at the given revision number. If the revision +// number in the request is behind the latest one kept in the server, an error +// message will be returned. See FieldMask for how to use FieldMask. Only +// fields specified in the UpdateProposalRequest.update_mask will be updated; +// Fields noted as 'Immutable' or 'Output only' yet specified in the +// UpdateProposalRequest.update_mask will be ignored and left unchanged. +// Updating a private auction proposal is not allowed and will result in an +// error. +// +// - name: Immutable. The name of the proposal serving as a unique identifier. +// Format: buyers/{accountId}/proposals/{proposalId}. +func (r *BuyersProposalsService) Patch(nameid string, proposal *Proposal) *BuyersProposalsPatchCall { + c := &BuyersProposalsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.proposal = proposal + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields to be +// updated. If empty or unspecified, the service will update all fields +// populated in the update request excluding the output only fields and +// primitive fields with default value. Note that explicit field mask is +// required in order to reset a primitive field back to its default value, for +// example, false for boolean fields, 0 for integer fields. A special field +// mask consisting of a single path "*" can be used to indicate full +// replacement(the equivalent of PUT method), updatable fields unset or +// unspecified in the input will be cleared or set to default value. Output +// only fields will be ignored regardless of the value of updateMask. +func (c *BuyersProposalsPatchCall) UpdateMask(updateMask string) *BuyersProposalsPatchCall { + 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 *BuyersProposalsPatchCall) Fields(s ...googleapi.Field) *BuyersProposalsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsPatchCall) Context(ctx context.Context) *BuyersProposalsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsPatchCall) 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.proposal) + 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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.proposals.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsPatchCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsSendRfpCall struct { + s *Service + buyer string + sendrfprequest *SendRfpRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SendRfp: Sends a request for proposal (RFP) to a publisher to initiate the +// negotiation regarding certain inventory. In the RFP, buyers can specify the +// deal type, deal terms, start and end dates, targeting, and a message to the +// publisher. Once the RFP is sent, a proposal in `SELLER_REVIEW_REQUESTED` +// state will be created and returned in the response. The publisher may review +// your request and respond with detailed deals in the proposal. +// +// - buyer: The current buyer who is sending the RFP in the format: +// `buyers/{accountId}`. +func (r *BuyersProposalsService) SendRfp(buyer string, sendrfprequest *SendRfpRequest) *BuyersProposalsSendRfpCall { + c := &BuyersProposalsSendRfpCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.buyer = buyer + c.sendrfprequest = sendrfprequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersProposalsSendRfpCall) Fields(s ...googleapi.Field) *BuyersProposalsSendRfpCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsSendRfpCall) Context(ctx context.Context) *BuyersProposalsSendRfpCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsSendRfpCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsSendRfpCall) 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.sendrfprequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+buyer}/proposals:sendRfp") + 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{ + "buyer": c.buyer, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.proposals.sendRfp" call. +// Any non-2xx status code is an error. Response headers are in either +// *Proposal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsSendRfpCall) Do(opts ...googleapi.CallOption) (*Proposal, 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 := &Proposal{ + 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 BuyersProposalsDealsBatchUpdateCall struct { + s *Service + parent string + batchupdatedealsrequest *BatchUpdateDealsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Batch updates multiple deals in the same proposal. +// +// - parent: The name of the proposal containing the deals to batch update. +// Format: buyers/{accountId}/proposals/{proposalId}. +func (r *BuyersProposalsDealsService) BatchUpdate(parent string, batchupdatedealsrequest *BatchUpdateDealsRequest) *BuyersProposalsDealsBatchUpdateCall { + c := &BuyersProposalsDealsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.batchupdatedealsrequest = batchupdatedealsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BuyersProposalsDealsBatchUpdateCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsBatchUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsDealsBatchUpdateCall) Context(ctx context.Context) *BuyersProposalsDealsBatchUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsDealsBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsDealsBatchUpdateCall) 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.batchupdatedealsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/deals:batchUpdate") + 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 "authorizedbuyersmarketplace.buyers.proposals.deals.batchUpdate" call. +// Any non-2xx status code is an error. Response headers are in either +// *BatchUpdateDealsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersProposalsDealsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateDealsResponse, 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 := &BatchUpdateDealsResponse{ + 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 BuyersProposalsDealsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a deal given its name. The deal is returned at its head revision. +// +// - name: Format: buyers/{accountId}/proposals/{proposalId}/deals/{dealId}. +func (r *BuyersProposalsDealsService) Get(name string) *BuyersProposalsDealsGetCall { + c := &BuyersProposalsDealsGetCall{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 *BuyersProposalsDealsGetCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsGetCall { + 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 *BuyersProposalsDealsGetCall) IfNoneMatch(entityTag string) *BuyersProposalsDealsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsDealsGetCall) Context(ctx context.Context) *BuyersProposalsDealsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsDealsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsDealsGetCall) 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 "authorizedbuyersmarketplace.buyers.proposals.deals.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Deal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsDealsGetCall) Do(opts ...googleapi.CallOption) (*Deal, 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 := &Deal{ + 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 BuyersProposalsDealsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all deals in a proposal. To retrieve only the finalized revision +// deals regardless if a deal is being renegotiated, see the FinalizedDeals +// resource. +// +// - parent: The name of the proposal containing the deals to retrieve. Format: +// buyers/{accountId}/proposals/{proposalId}. +func (r *BuyersProposalsDealsService) List(parent string) *BuyersProposalsDealsListCall { + c := &BuyersProposalsDealsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. If requested more than 500, +// the server will return 500 results per page. If unspecified, the server will +// pick a default page size of 100. +func (c *BuyersProposalsDealsListCall) PageSize(pageSize int64) *BuyersProposalsDealsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned from ListDealsResponse. +func (c *BuyersProposalsDealsListCall) PageToken(pageToken string) *BuyersProposalsDealsListCall { + 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 *BuyersProposalsDealsListCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsListCall { + 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 *BuyersProposalsDealsListCall) IfNoneMatch(entityTag string) *BuyersProposalsDealsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsDealsListCall) Context(ctx context.Context) *BuyersProposalsDealsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsDealsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsDealsListCall) 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}/deals") + 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 "authorizedbuyersmarketplace.buyers.proposals.deals.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListDealsResponse.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *BuyersProposalsDealsListCall) Do(opts ...googleapi.CallOption) (*ListDealsResponse, 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 := &ListDealsResponse{ + 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 *BuyersProposalsDealsListCall) Pages(ctx context.Context, f func(*ListDealsResponse) 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 BuyersProposalsDealsPatchCall struct { + s *Service + nameid string + deal *Deal + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the given deal at the buyer known revision number. If the +// server revision has advanced since the passed-in proposal.proposal_revision +// an ABORTED error message will be returned. The revision number is +// incremented by the server whenever the proposal or its constituent deals are +// updated. Note: The revision number is kept at a proposal level. The buyer of +// the API is expected to keep track of the revision number after the last +// update operation and send it in as part of the next update request. This +// way, if there are further changes on the server (for example, seller making +// new updates), then the server can detect conflicts and reject the proposed +// changes. +// +// - name: Immutable. The unique identifier of the deal. Auto-generated by the +// server when a deal is created. Format: +// buyers/{accountId}/proposals/{proposalId}/deals/{dealId}. +func (r *BuyersProposalsDealsService) Patch(nameid string, deal *Deal) *BuyersProposalsDealsPatchCall { + c := &BuyersProposalsDealsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.deal = deal + return c +} + +// UpdateMask sets the optional parameter "updateMask": List of fields to be +// updated. If empty or unspecified, the service will update all fields +// populated in the update request excluding the output only fields and +// primitive fields with default value. Note that explicit field mask is +// required in order to reset a primitive field back to its default value, for +// example, false for boolean fields, 0 for integer fields. A special field +// mask consisting of a single path "*" can be used to indicate full +// replacement(the equivalent of PUT method), updatable fields unset or +// unspecified in the input will be cleared or set to default value. Output +// only fields will be ignored regardless of the value of updateMask. +func (c *BuyersProposalsDealsPatchCall) UpdateMask(updateMask string) *BuyersProposalsDealsPatchCall { + 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 *BuyersProposalsDealsPatchCall) Fields(s ...googleapi.Field) *BuyersProposalsDealsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersProposalsDealsPatchCall) Context(ctx context.Context) *BuyersProposalsDealsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersProposalsDealsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersProposalsDealsPatchCall) 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.deal) + 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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "authorizedbuyersmarketplace.buyers.proposals.deals.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Deal.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *BuyersProposalsDealsPatchCall) Do(opts ...googleapi.CallOption) (*Deal, 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 := &Deal{ + 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 BuyersPublisherProfilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the requested publisher profile by name. +// +// - name: Name of the publisher profile. Format: +// `buyers/{buyerId}/publisherProfiles/{publisherProfileId}`. +func (r *BuyersPublisherProfilesService) Get(name string) *BuyersPublisherProfilesGetCall { + c := &BuyersPublisherProfilesGetCall{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 *BuyersPublisherProfilesGetCall) Fields(s ...googleapi.Field) *BuyersPublisherProfilesGetCall { + 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 *BuyersPublisherProfilesGetCall) IfNoneMatch(entityTag string) *BuyersPublisherProfilesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersPublisherProfilesGetCall) Context(ctx context.Context) *BuyersPublisherProfilesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersPublisherProfilesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersPublisherProfilesGetCall) 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 "authorizedbuyersmarketplace.buyers.publisherProfiles.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *PublisherProfile.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *BuyersPublisherProfilesGetCall) Do(opts ...googleapi.CallOption) (*PublisherProfile, 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 := &PublisherProfile{ + 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 BuyersPublisherProfilesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists publisher profiles. The returned publisher profiles aren't in +// any defined order. The order of the results might change. A new publisher +// profile can appear in any place in the list of returned results. +// +// - parent: Parent that owns the collection of publisher profiles Format: +// `buyers/{buyerId}`. +func (r *BuyersPublisherProfilesService) List(parent string) *BuyersPublisherProfilesListCall { + c := &BuyersPublisherProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Optional query string using the +// [Cloud API list filtering] +// (https://developers.google.com/authorized-buyers/apis/guides/list-filters) +// syntax. +func (c *BuyersPublisherProfilesListCall) Filter(filter string) *BuyersPublisherProfilesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer results than requested. If requested more than 500, +// the server will return 500 results per page. If unspecified, the server will +// pick a default page size of 100. +func (c *BuyersPublisherProfilesListCall) PageSize(pageSize int64) *BuyersPublisherProfilesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The page token as +// returned from a previous ListPublisherProfilesResponse. +func (c *BuyersPublisherProfilesListCall) PageToken(pageToken string) *BuyersPublisherProfilesListCall { + 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 *BuyersPublisherProfilesListCall) Fields(s ...googleapi.Field) *BuyersPublisherProfilesListCall { + 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 *BuyersPublisherProfilesListCall) IfNoneMatch(entityTag string) *BuyersPublisherProfilesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BuyersPublisherProfilesListCall) Context(ctx context.Context) *BuyersPublisherProfilesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BuyersPublisherProfilesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BuyersPublisherProfilesListCall) 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}/publisherProfiles") + 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 "authorizedbuyersmarketplace.buyers.publisherProfiles.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListPublisherProfilesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BuyersPublisherProfilesListCall) Do(opts ...googleapi.CallOption) (*ListPublisherProfilesResponse, 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 := &ListPublisherProfilesResponse{ + 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 *BuyersPublisherProfilesListCall) Pages(ctx context.Context, f func(*ListPublisherProfilesResponse) 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/backupdr/v1/backupdr-api.json b/backupdr/v1/backupdr-api.json index 3dcd04ca84d..85a25aadc39 100644 --- a/backupdr/v1/backupdr-api.json +++ b/backupdr/v1/backupdr-api.json @@ -398,6 +398,11 @@ "name" ], "parameters": { + "force": { + "description": "Optional. If set to true, will not check plan duration against backup vault enforcement duration. Non-standard field.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Output only. The resource name.", "location": "path", @@ -1256,7 +1261,7 @@ } } }, - "revision": "20240626", + "revision": "20240711", "rootUrl": "https://backupdr.googleapis.com/", "schemas": { "AbandonBackupRequest": { @@ -1418,6 +1423,11 @@ ], "type": "string" }, + "diskTypeUri": { + "description": "Optional. Output only. The URI of the disk type resource. For example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd", + "readOnly": true, + "type": "string" + }, "guestOsFeature": { "description": "Optional. A list of features to enable on the guest operating system. Applicable only for bootable images.", "items": { @@ -2022,8 +2032,8 @@ }, "type": "array" }, - "sourceInstanceName": { - "description": "Name of the source instance at the time of backup. The name is 1-63 characters long, and complies with RFC1035.", + "sourceInstance": { + "description": "The source instance used to create this backup. This can be a partial or full URL to the resource. For example, the following are valid values: -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance -projects/project/zones/zone/instances/instance", "type": "string" }, "tags": { diff --git a/backupdr/v1/backupdr-gen.go b/backupdr/v1/backupdr-gen.go index 349129627d8..16f502bfc44 100644 --- a/backupdr/v1/backupdr-gen.go +++ b/backupdr/v1/backupdr-gen.go @@ -412,6 +412,9 @@ type AttachedDisk struct { // "SCRATCH" - A scratch disk type. // "PERSISTENT" - A persistent disk type. DiskType string `json:"diskType,omitempty"` + // DiskTypeUri: Optional. Output only. The URI of the disk type resource. For + // example: projects/project/zones/zone/diskTypes/pd-standard or pd-ssd + DiskTypeUri string `json:"diskTypeUri,omitempty"` // GuestOsFeature: Optional. A list of features to enable on the guest // operating system. Applicable only for bootable images. GuestOsFeature []*GuestOsFeature `json:"guestOsFeature,omitempty"` @@ -1029,9 +1032,12 @@ type ComputeInstanceBackupProperties struct { // created from these properties. Use metadata queries to obtain the access // tokens for these instances. ServiceAccount []*ServiceAccount `json:"serviceAccount,omitempty"` - // SourceInstanceName: Name of the source instance at the time of backup. The - // name is 1-63 characters long, and complies with RFC1035. - SourceInstanceName string `json:"sourceInstanceName,omitempty"` + // SourceInstance: The source instance used to create this backup. This can be + // a partial or full URL to the resource. For example, the following are valid + // values: + // -https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ + // instance -projects/project/zones/zone/instances/instance + SourceInstance string `json:"sourceInstance,omitempty"` // Tags: A list of tags to apply to the instances that are created from these // properties. The tags identify valid sources or targets for network // firewalls. The setTags method can modify this list of tags. Each tag within @@ -3774,6 +3780,13 @@ func (r *ProjectsLocationsBackupVaultsService) Patch(name string, backupvault *B return c } +// Force sets the optional parameter "force": If set to true, will not check +// plan duration against backup vault enforcement duration. Non-standard field. +func (c *ProjectsLocationsBackupVaultsPatchCall) Force(force bool) *ProjectsLocationsBackupVaultsPatchCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + 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 diff --git a/certificatemanager/v1/certificatemanager-api.json b/certificatemanager/v1/certificatemanager-api.json index 052a610dbb0..6fd46c0b4bf 100644 --- a/certificatemanager/v1/certificatemanager-api.json +++ b/certificatemanager/v1/certificatemanager-api.json @@ -1280,7 +1280,7 @@ } } }, - "revision": "20240417", + "revision": "20240710", "rootUrl": "https://certificatemanager.googleapis.com/", "schemas": { "AllowlistedCertificate": { @@ -1658,7 +1658,7 @@ "type": "string" }, "type": { - "description": "Immutable. Type of DnsAuthorization. If unset during resource creation the following default will be used: - in location global: FIXED_RECORD.", + "description": "Immutable. Type of DnsAuthorization. If unset during resource creation the following default will be used: - in location `global`: FIXED_RECORD, - in other locations: PER_PROJECT_RECORD.", "enum": [ "TYPE_UNSPECIFIED", "FIXED_RECORD", diff --git a/certificatemanager/v1/certificatemanager-gen.go b/certificatemanager/v1/certificatemanager-gen.go index dfb8a78d811..096eb978acc 100644 --- a/certificatemanager/v1/certificatemanager-gen.go +++ b/certificatemanager/v1/certificatemanager-gen.go @@ -628,7 +628,8 @@ type DnsAuthorization struct { // `projects/*/locations/*/dnsAuthorizations/*`. Name string `json:"name,omitempty"` // Type: Immutable. Type of DnsAuthorization. If unset during resource creation - // the following default will be used: - in location global: FIXED_RECORD. + // the following default will be used: - in location `global`: FIXED_RECORD, - + // in other locations: PER_PROJECT_RECORD. // // Possible values: // "TYPE_UNSPECIFIED" - Type is unspecified. diff --git a/classroom/v1/classroom-api.json b/classroom/v1/classroom-api.json index 1a5b3df40e7..11cdbe40fb8 100644 --- a/classroom/v1/classroom-api.json +++ b/classroom/v1/classroom-api.json @@ -564,7 +564,7 @@ "type": "string" }, "attachmentId": { - "description": "Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.", + "description": "Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).", "location": "query", "type": "string" }, @@ -1061,7 +1061,7 @@ "type": "string" }, "attachmentId": { - "description": "Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.", + "description": "Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).", "location": "query", "type": "string" }, @@ -2021,7 +2021,7 @@ "type": "string" }, "attachmentId": { - "description": "Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.", + "description": "Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).", "location": "query", "type": "string" }, @@ -2402,7 +2402,7 @@ "type": "string" }, "attachmentId": { - "description": "Optional. The identifier of the attachment. This field is required for student users and optional for teacher users. If not provided in the student case, an error is returned.", + "description": "Optional. The identifier of the attachment. This field is required for all requests except when the user is in the [Attachment Discovery iframe](https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe).", "location": "query", "type": "string" }, @@ -3695,7 +3695,7 @@ } } }, - "revision": "20240701", + "revision": "20240713", "rootUrl": "https://classroom.googleapis.com/", "schemas": { "AddOnAttachment": { diff --git a/classroom/v1/classroom-gen.go b/classroom/v1/classroom-gen.go index 301ba958dcd..39382a1f488 100644 --- a/classroom/v1/classroom-gen.go +++ b/classroom/v1/classroom-gen.go @@ -4478,8 +4478,9 @@ func (c *CoursesAnnouncementsGetAddOnContextCall) AddOnToken(addOnToken string) } // AttachmentId sets the optional parameter "attachmentId": The identifier of -// the attachment. This field is required for student users and optional for -// teacher users. If not provided in the student case, an error is returned. +// the attachment. This field is required for all requests except when the user +// is in the Attachment Discovery iframe +// (https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe). func (c *CoursesAnnouncementsGetAddOnContextCall) AttachmentId(attachmentId string) *CoursesAnnouncementsGetAddOnContextCall { c.urlParams_.Set("attachmentId", attachmentId) return c @@ -6064,8 +6065,9 @@ func (c *CoursesCourseWorkGetAddOnContextCall) AddOnToken(addOnToken string) *Co } // AttachmentId sets the optional parameter "attachmentId": The identifier of -// the attachment. This field is required for student users and optional for -// teacher users. If not provided in the student case, an error is returned. +// the attachment. This field is required for all requests except when the user +// is in the Attachment Discovery iframe +// (https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe). func (c *CoursesCourseWorkGetAddOnContextCall) AttachmentId(attachmentId string) *CoursesCourseWorkGetAddOnContextCall { c.urlParams_.Set("attachmentId", attachmentId) return c @@ -8878,8 +8880,9 @@ func (c *CoursesCourseWorkMaterialsGetAddOnContextCall) AddOnToken(addOnToken st } // AttachmentId sets the optional parameter "attachmentId": The identifier of -// the attachment. This field is required for student users and optional for -// teacher users. If not provided in the student case, an error is returned. +// the attachment. This field is required for all requests except when the user +// is in the Attachment Discovery iframe +// (https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe). func (c *CoursesCourseWorkMaterialsGetAddOnContextCall) AttachmentId(attachmentId string) *CoursesCourseWorkMaterialsGetAddOnContextCall { c.urlParams_.Set("attachmentId", attachmentId) return c @@ -10034,8 +10037,9 @@ func (c *CoursesPostsGetAddOnContextCall) AddOnToken(addOnToken string) *Courses } // AttachmentId sets the optional parameter "attachmentId": The identifier of -// the attachment. This field is required for student users and optional for -// teacher users. If not provided in the student case, an error is returned. +// the attachment. This field is required for all requests except when the user +// is in the Attachment Discovery iframe +// (https://developers.google.com/classroom/add-ons/get-started/iframes/attachment-discovery-iframe). func (c *CoursesPostsGetAddOnContextCall) AttachmentId(attachmentId string) *CoursesPostsGetAddOnContextCall { c.urlParams_.Set("attachmentId", attachmentId) return c diff --git a/cloudasset/v1/cloudasset-api.json b/cloudasset/v1/cloudasset-api.json index c2481c33b58..6efa34faa3a 100644 --- a/cloudasset/v1/cloudasset-api.json +++ b/cloudasset/v1/cloudasset-api.json @@ -1095,7 +1095,7 @@ } } }, - "revision": "20240629", + "revision": "20240717", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AccessSelector": { @@ -2836,7 +2836,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" }, @@ -2865,7 +2865,7 @@ "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -3152,7 +3152,7 @@ "properties": { "vpcSubnetwork": { "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/cloudasset/v1/cloudasset-gen.go b/cloudasset/v1/cloudasset-gen.go index 75bcf279592..b274fa843ee 100644 --- a/cloudasset/v1/cloudasset-gen.go +++ b/cloudasset/v1/cloudasset-gen.go @@ -2972,8 +2972,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -3043,8 +3042,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -3488,9 +3486,7 @@ func (s GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON() // GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating // network source in Google Cloud. type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudasset/v1beta1/cloudasset-api.json b/cloudasset/v1beta1/cloudasset-api.json index 6e0cd2525cf..770e7aabdce 100644 --- a/cloudasset/v1beta1/cloudasset-api.json +++ b/cloudasset/v1beta1/cloudasset-api.json @@ -411,7 +411,7 @@ } } }, - "revision": "20240629", + "revision": "20240717", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -1161,7 +1161,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" }, @@ -1190,7 +1190,7 @@ "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -1477,7 +1477,7 @@ "properties": { "vpcSubnetwork": { "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/cloudasset/v1beta1/cloudasset-gen.go b/cloudasset/v1beta1/cloudasset-gen.go index b683bfb6007..c375356204b 100644 --- a/cloudasset/v1beta1/cloudasset-gen.go +++ b/cloudasset/v1beta1/cloudasset-gen.go @@ -1444,8 +1444,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -1515,8 +1514,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -1960,9 +1958,7 @@ func (s GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON() // GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating // network source in Google Cloud. type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudasset/v1p1beta1/cloudasset-api.json b/cloudasset/v1p1beta1/cloudasset-api.json index 53266af6197..b99373ddfb9 100644 --- a/cloudasset/v1p1beta1/cloudasset-api.json +++ b/cloudasset/v1p1beta1/cloudasset-api.json @@ -207,7 +207,7 @@ } } }, - "revision": "20240629", + "revision": "20240717", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -863,7 +863,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" }, @@ -892,7 +892,7 @@ "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -1179,7 +1179,7 @@ "properties": { "vpcSubnetwork": { "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/cloudasset/v1p1beta1/cloudasset-gen.go b/cloudasset/v1p1beta1/cloudasset-gen.go index 445e845cd53..4b390c85569 100644 --- a/cloudasset/v1p1beta1/cloudasset-gen.go +++ b/cloudasset/v1p1beta1/cloudasset-gen.go @@ -1255,8 +1255,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -1326,8 +1325,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -1771,9 +1769,7 @@ func (s GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON() // GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating // network source in Google Cloud. type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudasset/v1p5beta1/cloudasset-api.json b/cloudasset/v1p5beta1/cloudasset-api.json index 076c32f8991..70aac1af8e7 100644 --- a/cloudasset/v1p5beta1/cloudasset-api.json +++ b/cloudasset/v1p5beta1/cloudasset-api.json @@ -177,7 +177,7 @@ } } }, - "revision": "20240629", + "revision": "20240717", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -868,7 +868,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" }, @@ -897,7 +897,7 @@ "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -1184,7 +1184,7 @@ "properties": { "vpcSubnetwork": { "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/cloudasset/v1p5beta1/cloudasset-gen.go b/cloudasset/v1p5beta1/cloudasset-gen.go index a0d07b0ad4d..dceb3160b28 100644 --- a/cloudasset/v1p5beta1/cloudasset-gen.go +++ b/cloudasset/v1p5beta1/cloudasset-gen.go @@ -1289,8 +1289,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -1360,8 +1359,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -1805,9 +1803,7 @@ func (s GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON() // GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating // network source in Google Cloud. type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudasset/v1p7beta1/cloudasset-api.json b/cloudasset/v1p7beta1/cloudasset-api.json index 4dcce169693..c9c31927c8c 100644 --- a/cloudasset/v1p7beta1/cloudasset-api.json +++ b/cloudasset/v1p7beta1/cloudasset-api.json @@ -167,7 +167,7 @@ } } }, - "revision": "20240629", + "revision": "20240717", "rootUrl": "https://cloudasset.googleapis.com/", "schemas": { "AnalyzeIamPolicyLongrunningMetadata": { @@ -937,7 +937,7 @@ "type": "string" }, "sources": { - "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "Sources that this EgressPolicy authorizes access from. If this field is not empty, then `source_restriction` must be set to `SOURCE_RESTRICTION_ENABLED`.", "items": { "$ref": "GoogleIdentityAccesscontextmanagerV1EgressSource" }, @@ -966,7 +966,7 @@ "id": "GoogleIdentityAccesscontextmanagerV1EgressSource", "properties": { "accessLevel": { - "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out.", + "description": "An AccessLevel resource name that allows protected resources inside the ServicePerimeters to access outside the ServicePerimeter boundaries. AccessLevels listed must be in the same policy as this ServicePerimeter. Referencing a nonexistent AccessLevel will cause an error. If an AccessLevel name is not specified, only resources within the perimeter can be accessed through Google Cloud calls with request origins within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a single `*` is specified for `access_level`, then all EgressSources will be allowed.", "type": "string" } }, @@ -1253,7 +1253,7 @@ "properties": { "vpcSubnetwork": { "$ref": "GoogleIdentityAccesscontextmanagerV1VpcSubNetwork", - "description": "Sub-segment ranges of a VPC network. TODO (b/332744441): annotate this field with custom_org_policy_accessibility when cl/640698580 will be rolled out." + "description": "Sub-segment ranges of a VPC network." } }, "type": "object" diff --git a/cloudasset/v1p7beta1/cloudasset-gen.go b/cloudasset/v1p7beta1/cloudasset-gen.go index 8429d431591..ea3ba5c14fd 100644 --- a/cloudasset/v1p7beta1/cloudasset-gen.go +++ b/cloudasset/v1p7beta1/cloudasset-gen.go @@ -1465,8 +1465,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressFrom struct { SourceRestriction string `json:"sourceRestriction,omitempty"` // Sources: Sources that this EgressPolicy authorizes access from. If this // field is not empty, then `source_restriction` must be set to - // `SOURCE_RESTRICTION_ENABLED`. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // `SOURCE_RESTRICTION_ENABLED`. Sources []*GoogleIdentityAccesscontextmanagerV1EgressSource `json:"sources,omitempty"` // ForceSendFields is a list of field names (e.g. "Identities") to // unconditionally include in API requests. By default, fields with empty or @@ -1536,8 +1535,7 @@ type GoogleIdentityAccesscontextmanagerV1EgressSource struct { // can be accessed through Google Cloud calls with request origins within the // perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`. If a // single `*` is specified for `access_level`, then all EgressSources will be - // allowed. TODO (b/332744441): annotate this field with - // custom_org_policy_accessibility when cl/640698580 will be rolled out. + // allowed. AccessLevel string `json:"accessLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessLevel") to // unconditionally include in API requests. By default, fields with empty or @@ -1981,9 +1979,7 @@ func (s GoogleIdentityAccesscontextmanagerV1VpcAccessibleServices) MarshalJSON() // GoogleIdentityAccesscontextmanagerV1VpcNetworkSource: The originating // network source in Google Cloud. type GoogleIdentityAccesscontextmanagerV1VpcNetworkSource struct { - // VpcSubnetwork: Sub-segment ranges of a VPC network. TODO (b/332744441): - // annotate this field with custom_org_policy_accessibility when cl/640698580 - // will be rolled out. + // VpcSubnetwork: Sub-segment ranges of a VPC network. VpcSubnetwork *GoogleIdentityAccesscontextmanagerV1VpcSubNetwork `json:"vpcSubnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "VpcSubnetwork") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json index f315e546c30..74cf0d08539 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240619", + "revision": "20240717", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -594,14 +594,17 @@ "properties": { "customerOnboardingState": { "$ref": "CustomerOnboardingState", - "description": "Container for customer onboarding steps" + "description": "Output only. Container for customer onboarding steps", + "readOnly": true }, "displayName": { - "description": "The customer organization's display name. E.g. \"google.com\".", + "description": "Output only. The customer organization's display name. E.g. \"google.com\".", + "readOnly": true, "type": "string" }, "isOnboarded": { - "description": "Indicates whether a customer is fully onboarded", + "description": "Output only. Indicates whether a customer is fully onboarded", + "readOnly": true, "type": "boolean" }, "name": { diff --git a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go index 4f093f8a4ac..50cfad6eb20 100644 --- a/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1/cloudcontrolspartner-gen.go @@ -357,11 +357,13 @@ func (s Console) MarshalJSON() ([]byte, error) { // Customer: Contains metadata around a Cloud Controls Partner Customer type Customer struct { - // CustomerOnboardingState: Container for customer onboarding steps + // CustomerOnboardingState: Output only. Container for customer onboarding + // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: The customer organization's display name. E.g. "google.com". + // DisplayName: Output only. The customer organization's display name. E.g. + // "google.com". DisplayName string `json:"displayName,omitempty"` - // IsOnboarded: Indicates whether a customer is fully onboarded + // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` // Name: Identifier. Format: // `organizations/{organization}/locations/{location}/customers/{customer}` diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json index 92be11523ab..aab2955b8a0 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-api.json @@ -484,7 +484,7 @@ } } }, - "revision": "20240619", + "revision": "20240717", "rootUrl": "https://cloudcontrolspartner.googleapis.com/", "schemas": { "AccessApprovalRequest": { @@ -594,14 +594,17 @@ "properties": { "customerOnboardingState": { "$ref": "CustomerOnboardingState", - "description": "Container for customer onboarding steps" + "description": "Output only. Container for customer onboarding steps", + "readOnly": true }, "displayName": { - "description": "The customer organization's display name. E.g. \"google.com\".", + "description": "Output only. The customer organization's display name. E.g. \"google.com\".", + "readOnly": true, "type": "string" }, "isOnboarded": { - "description": "Indicates whether a customer is fully onboarded", + "description": "Output only. Indicates whether a customer is fully onboarded", + "readOnly": true, "type": "boolean" }, "name": { diff --git a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go index db0afe18386..8c984bd066b 100644 --- a/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go +++ b/cloudcontrolspartner/v1beta/cloudcontrolspartner-gen.go @@ -357,11 +357,13 @@ func (s Console) MarshalJSON() ([]byte, error) { // Customer: Contains metadata around a Cloud Controls Partner Customer type Customer struct { - // CustomerOnboardingState: Container for customer onboarding steps + // CustomerOnboardingState: Output only. Container for customer onboarding + // steps CustomerOnboardingState *CustomerOnboardingState `json:"customerOnboardingState,omitempty"` - // DisplayName: The customer organization's display name. E.g. "google.com". + // DisplayName: Output only. The customer organization's display name. E.g. + // "google.com". DisplayName string `json:"displayName,omitempty"` - // IsOnboarded: Indicates whether a customer is fully onboarded + // IsOnboarded: Output only. Indicates whether a customer is fully onboarded IsOnboarded bool `json:"isOnboarded,omitempty"` // Name: Identifier. Format: // `organizations/{organization}/locations/{location}/customers/{customer}` diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 773024a1318..a4ada7a5717 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20240523", + "revision": "20240711", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -1942,7 +1942,7 @@ "type": "string" }, "url": { - "description": "The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats: To refer to a specific commit: `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` To refer to a moveable alias (branch): `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` In particular, to refer to HEAD use `master` moveable alias. To refer to a specific fixed alias (tag): `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` You may omit `paths/*` if you want to use the main directory.", + "description": "The URL pointing to the hosted repository where the function is defined. There are supported Cloud Source Repository URLs in the following formats: To refer to a specific commit: `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` To refer to a moveable alias (branch): `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` In particular, to refer to HEAD use `master` moveable alias. To refer to a specific fixed alias (tag): `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` You may omit `paths/*` if you want to use the main directory. The function response may add an empty `/paths/` to the URL.", "type": "string" } }, diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index d34a24709f8..116025015f1 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -1898,7 +1898,8 @@ type SourceRepository struct { // aths/*` In particular, to refer to HEAD use `master` moveable alias. To // refer to a specific fixed alias (tag): // `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/path - // s/*` You may omit `paths/*` if you want to use the main directory. + // s/*` You may omit `paths/*` if you want to use the main directory. The + // function response may add an empty `/paths/` to the URL. Url string `json:"url,omitempty"` // ForceSendFields is a list of field names (e.g. "DeployedUrl") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudtrace/v2beta1/cloudtrace-api.json b/cloudtrace/v2beta1/cloudtrace-api.json index 7c11c7400e6..e332ace69d4 100644 --- a/cloudtrace/v2beta1/cloudtrace-api.json +++ b/cloudtrace/v2beta1/cloudtrace-api.json @@ -273,7 +273,7 @@ } } }, - "revision": "20220421", + "revision": "20240712", "rootUrl": "https://cloudtrace.googleapis.com/", "schemas": { "Empty": { @@ -305,7 +305,7 @@ "id": "OutputConfig", "properties": { "destination": { - "description": "The destination for writing trace data. Supported formats include: \"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"", + "description": "Required. The destination for writing trace data. Supported formats include: \"bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]\"", "type": "string" } }, @@ -316,7 +316,7 @@ "id": "TraceSink", "properties": { "name": { - "description": "Required. The canonical sink resource name, unique within the project. Must be of the form: projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.: `\"projects/12345/traceSinks/my-project-trace-sink\"`. Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", + "description": "Identifier. The canonical sink resource name, unique within the project. Must be of the form: projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.: `\"projects/12345/traceSinks/my-project-trace-sink\"`. Sink identifiers are limited to 256 characters and can include only the following characters: upper and lower-case alphanumeric characters, underscores, hyphens, and periods.", "type": "string" }, "outputConfig": { diff --git a/cloudtrace/v2beta1/cloudtrace-gen.go b/cloudtrace/v2beta1/cloudtrace-gen.go index a3fbd21f454..f68ce9afbbf 100644 --- a/cloudtrace/v2beta1/cloudtrace-gen.go +++ b/cloudtrace/v2beta1/cloudtrace-gen.go @@ -228,8 +228,9 @@ func (s ListTraceSinksResponse) MarshalJSON() ([]byte, error) { // OutputConfig: OutputConfig contains a destination for writing trace data. type OutputConfig struct { - // Destination: The destination for writing trace data. Supported formats - // include: "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + // Destination: Required. The destination for writing trace data. Supported + // formats include: + // "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" Destination string `json:"destination,omitempty"` // ForceSendFields is a list of field names (e.g. "Destination") to // unconditionally include in API requests. By default, fields with empty or @@ -252,8 +253,9 @@ func (s OutputConfig) MarshalJSON() ([]byte, error) { // TraceSink: Describes a sink used to export traces to a BigQuery dataset. The // sink must be created within a project. type TraceSink struct { - // Name: Required. The canonical sink resource name, unique within the project. - // Must be of the form: projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.: + // Name: Identifier. The canonical sink resource name, unique within the + // project. Must be of the form: + // projects/[PROJECT_NUMBER]/traceSinks/[SINK_ID]. E.g.: // "projects/12345/traceSinks/my-project-trace-sink". Sink identifiers are // limited to 256 characters and can include only the following characters: // upper and lower-case alphanumeric characters, underscores, hyphens, and diff --git a/composer/v1/composer-api.json b/composer/v1/composer-api.json index 4eebf7439c3..21c00954259 100644 --- a/composer/v1/composer-api.json +++ b/composer/v1/composer-api.json @@ -966,7 +966,7 @@ } } }, - "revision": "20240520", + "revision": "20240716", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AirflowMetadataRetentionPolicyConfig": { @@ -1304,6 +1304,11 @@ "description": "The resource name of the environment, in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "satisfiesPzs": { "description": "Output only. Reserved for future use.", "readOnly": true, diff --git a/composer/v1/composer-gen.go b/composer/v1/composer-gen.go index 87a83295f13..2f355b53686 100644 --- a/composer/v1/composer-gen.go +++ b/composer/v1/composer-gen.go @@ -722,6 +722,8 @@ type Environment struct { // EnvironmentId must start with a lowercase letter followed by up to 63 // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. 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"` // State: The current state of the environment. diff --git a/composer/v1beta1/composer-api.json b/composer/v1beta1/composer-api.json index ab6b2999117..92f27591643 100644 --- a/composer/v1beta1/composer-api.json +++ b/composer/v1beta1/composer-api.json @@ -994,7 +994,7 @@ } } }, - "revision": "20240310", + "revision": "20240716", "rootUrl": "https://composer.googleapis.com/", "schemas": { "AirflowMetadataRetentionPolicyConfig": { @@ -1339,6 +1339,11 @@ "description": "The resource name of the environment, in the form: \"projects/{projectId}/locations/{locationId}/environments/{environmentId}\" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", "type": "string" }, + "satisfiesPzi": { + "description": "Output only. Reserved for future use.", + "readOnly": true, + "type": "boolean" + }, "satisfiesPzs": { "description": "Output only. Reserved for future use.", "readOnly": true, diff --git a/composer/v1beta1/composer-gen.go b/composer/v1beta1/composer-gen.go index 60542152591..957c1d1f202 100644 --- a/composer/v1beta1/composer-gen.go +++ b/composer/v1beta1/composer-gen.go @@ -725,6 +725,8 @@ type Environment struct { // EnvironmentId must start with a lowercase letter followed by up to 63 // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. 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"` // State: The current state of the environment. diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index cd3a0d54549..a55a16ac353 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -14084,6 +14084,210 @@ } } }, + "instantSnapshotGroups": { + "methods": { + "delete": { + "description": "deletes a Zonal InstantSnapshotGroup resource", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", + "httpMethod": "DELETE", + "id": "compute.instantSnapshotGroups.delete", + "parameterOrder": [ + "project", + "zone", + "instantSnapshotGroup" + ], + "parameters": { + "instantSnapshotGroup": { + "description": "Name of the InstantSnapshot resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "returns the specified InstantSnapshotGroup resource in the specified zone.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", + "httpMethod": "GET", + "id": "compute.instantSnapshotGroups.get", + "parameterOrder": [ + "project", + "zone", + "instantSnapshotGroup" + ], + "parameters": { + "instantSnapshotGroup": { + "description": "Name of the instantSnapshotGroup 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" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}", + "response": { + "$ref": "InstantSnapshotGroup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "description": "inserts a Zonal InstantSnapshotGroup resource", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups", + "httpMethod": "POST", + "id": "compute.instantSnapshotGroups.insert", + "parameterOrder": [ + "project", + "zone" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "sourceConsistencyGroup": { + "description": "begin_interface: MixerMutationRequestBuilder", + "location": "query", + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups", + "request": { + "$ref": "InstantSnapshotGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "retrieves the list of InstantSnapshotGroup resources contained within the specified zone.", + "flatPath": "projects/{project}/zones/{zone}/instantSnapshotGroups", + "httpMethod": "GET", + "id": "compute.instantSnapshotGroups.list", + "parameterOrder": [ + "project", + "zone" + ], + "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" + }, + "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" + }, + "zone": { + "description": "The name of the zone for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instantSnapshotGroups", + "response": { + "$ref": "ListInstantSnapshotGroups" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "instantSnapshots": { "methods": { "aggregatedList": { @@ -26304,6 +26508,106 @@ } } }, + "regionInstanceGroupManagerResizeRequests": { + "methods": { + "get": { + "description": "Returns all of the details about the specified resize request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "httpMethod": "GET", + "id": "compute.regionInstanceGroupManagerResizeRequests.get", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager", + "resizeRequest" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "resizeRequest": { + "description": "The name of the resize request. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}", + "response": { + "$ref": "InstanceGroupManagerResizeRequest" + }, + "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 new Resize Request that starts provisioning VMs immediately or queues VM creation.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagerResizeRequests.insert", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group to which the resize request is scoped. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request. Name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resizeRequests", + "request": { + "$ref": "InstanceGroupManagerResizeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + } + } + }, "regionInstanceGroupManagers": { "methods": { "abandonInstances": { @@ -28207,6 +28511,210 @@ } } }, + "regionInstantSnapshotGroups": { + "methods": { + "delete": { + "description": "deletes a Regional InstantSnapshotGroup resource", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshotGroup}", + "httpMethod": "DELETE", + "id": "compute.regionInstantSnapshotGroups.delete", + "parameterOrder": [ + "project", + "region", + "instantSnapshotGroup" + ], + "parameters": { + "instantSnapshotGroup": { + "description": "Name of the InstantSnapshotGroup resource to delete.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The name of the region 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}/instantSnapshotGroups/{instantSnapshotGroup}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "description": "returns the specified InstantSnapshotGroup resource in the specified region.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshot}", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshotGroups.get", + "parameterOrder": [ + "project", + "region", + "instantSnapshot" + ], + "parameters": { + "instantSnapshot": { + "description": "Name of the InstantSnapshotGroup 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": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshotGroups/{instantSnapshot}", + "response": { + "$ref": "InstantSnapshotGroup" + }, + "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 InstantSnapshotGroup resource", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups", + "httpMethod": "POST", + "id": "compute.regionInstantSnapshotGroups.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" + }, + "sourceConsistencyGroup": { + "description": "begin_interface: MixerMutationRequestBuilder", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/instantSnapshotGroups", + "request": { + "$ref": "InstantSnapshotGroup" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "description": "retrieves the list of InstantSnapshotGroup resources contained within the specified region.", + "flatPath": "projects/{project}/regions/{region}/instantSnapshotGroups", + "httpMethod": "GET", + "id": "compute.regionInstantSnapshotGroups.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": "The name of the region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "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}/instantSnapshotGroups", + "response": { + "$ref": "ListInstantSnapshotGroups" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "regionInstantSnapshots": { "methods": { "delete": { @@ -44715,7 +45223,7 @@ } } }, - "revision": "20240702", + "revision": "20240707", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -59757,6 +60265,10 @@ "description": "[Output Only] The URL of the region where the managed instance group resides (for regional resources).", "type": "string" }, + "resourcePolicies": { + "$ref": "InstanceGroupManagerResourcePolicies", + "description": "Resource policies for this managed instance group." + }, "satisfiesPzi": { "description": "[Output Only] Reserved for future use.", "type": "boolean" @@ -60799,6 +61311,16 @@ }, "type": "object" }, + "InstanceGroupManagerResourcePolicies": { + "id": "InstanceGroupManagerResourcePolicies", + "properties": { + "workloadPolicy": { + "description": "The URL of the workload policy that is specified for this managed instance group. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy ", + "type": "string" + } + }, + "type": "object" + }, "InstanceGroupManagerStandbyPolicy": { "id": "InstanceGroupManagerStandbyPolicy", "properties": { @@ -63847,6 +64369,101 @@ }, "type": "object" }, + "InstantSnapshotGroup": { + "id": "InstantSnapshotGroup", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "Optional. 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#instantSnapshotGroup", + "description": "[Output Only] Type of the resource. Always compute#instantSnapshotGroup for InstantSnapshotGroup resources.", + "type": "string" + }, + "name": { + "description": "Identifier. 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" + }, + "region": { + "description": "[Output Only] URL of the region where the instant snapshot group resides. 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" + }, + "resourceStatus": { + "$ref": "InstantSnapshotGroupResourceStatus" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource's resource id.", + "type": "string" + }, + "status": { + "description": "[Output Only]", + "enum": [ + "CREATING", + "DELETING", + "FAILED", + "INVALID", + "READY", + "UNKNOWN" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ], + "type": "string" + }, + "zone": { + "description": "[Output Only] URL of the zone where the instant snapshot group resides. 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" + } + }, + "type": "object" + }, + "InstantSnapshotGroupResourceStatus": { + "id": "InstantSnapshotGroupResourceStatus", + "properties": { + "consistencyMembershipResolutionTime": { + "description": "[Output Only]", + "format": "google-datetime", + "type": "string" + }, + "sourceInfo": { + "$ref": "InstantSnapshotGroupSourceInfo", + "description": "[Output Only]" + } + }, + "type": "object" + }, + "InstantSnapshotGroupSourceInfo": { + "id": "InstantSnapshotGroupSourceInfo", + "properties": { + "consistencyGroup": { + "type": "string" + }, + "consistencyGroupId": { + "type": "string" + } + }, + "type": "object" + }, "InstantSnapshotList": { "description": "Contains a list of InstantSnapshot resources.", "id": "InstantSnapshotList", @@ -64382,6 +64999,9 @@ "bandwidthPercentagePolicy": { "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" }, + "egressMinBandwidthPercentagePolicy": { + "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" + }, "profileDescription": { "description": "A description for the AAI profile on this interconnect.", "type": "string" @@ -67176,6 +67796,168 @@ }, "type": "object" }, + "ListInstantSnapshotGroups": { + "description": "Contains a list of InstantSnapshotGroup resources.", + "id": "ListInstantSnapshotGroups", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of InstantSnapshotGroup resources.", + "items": { + "$ref": "InstantSnapshotGroup" + }, + "type": "array" + }, + "kind": { + "default": "compute#instantSnapshotGroupsList", + "description": "Type of resource.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "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" + }, "LocalDisk": { "id": "LocalDisk", "properties": { @@ -68694,6 +69476,9 @@ "selfLinkWithId": { "description": "[Output Only] Server-defined URL for this resource with the resource id.", "type": "string" + }, + "status": { + "$ref": "MultiMigStatus" } }, "type": "object" @@ -68746,6 +69531,18 @@ }, "type": "object" }, + "MultiMigStatus": { + "id": "MultiMigStatus", + "properties": { + "memberInstanceGroupManagers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "MultiMigsList": { "id": "MultiMigsList", "properties": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 34fd176fea1..3c4ac294300 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -191,6 +191,7 @@ func New(client *http.Client) (*Service, error) { s.InstanceSettings = NewInstanceSettingsService(s) s.InstanceTemplates = NewInstanceTemplatesService(s) s.Instances = NewInstancesService(s) + s.InstantSnapshotGroups = NewInstantSnapshotGroupsService(s) s.InstantSnapshots = NewInstantSnapshotsService(s) s.InterconnectAttachments = NewInterconnectAttachmentsService(s) s.InterconnectLocations = NewInterconnectLocationsService(s) @@ -223,10 +224,12 @@ func New(client *http.Client) (*Service, error) { s.RegionDisks = NewRegionDisksService(s) s.RegionHealthCheckServices = NewRegionHealthCheckServicesService(s) s.RegionHealthChecks = NewRegionHealthChecksService(s) + s.RegionInstanceGroupManagerResizeRequests = NewRegionInstanceGroupManagerResizeRequestsService(s) s.RegionInstanceGroupManagers = NewRegionInstanceGroupManagersService(s) s.RegionInstanceGroups = NewRegionInstanceGroupsService(s) s.RegionInstanceTemplates = NewRegionInstanceTemplatesService(s) s.RegionInstances = NewRegionInstancesService(s) + s.RegionInstantSnapshotGroups = NewRegionInstantSnapshotGroupsService(s) s.RegionInstantSnapshots = NewRegionInstantSnapshotsService(s) s.RegionMultiMigs = NewRegionMultiMigsService(s) s.RegionNetworkEndpointGroups = NewRegionNetworkEndpointGroupsService(s) @@ -339,6 +342,8 @@ type Service struct { Instances *InstancesService + InstantSnapshotGroups *InstantSnapshotGroupsService + InstantSnapshots *InstantSnapshotsService InterconnectAttachments *InterconnectAttachmentsService @@ -403,6 +408,8 @@ type Service struct { RegionHealthChecks *RegionHealthChecksService + RegionInstanceGroupManagerResizeRequests *RegionInstanceGroupManagerResizeRequestsService + RegionInstanceGroupManagers *RegionInstanceGroupManagersService RegionInstanceGroups *RegionInstanceGroupsService @@ -411,6 +418,8 @@ type Service struct { RegionInstances *RegionInstancesService + RegionInstantSnapshotGroups *RegionInstantSnapshotGroupsService + RegionInstantSnapshots *RegionInstantSnapshotsService RegionMultiMigs *RegionMultiMigsService @@ -777,6 +786,15 @@ type InstancesService struct { s *Service } +func NewInstantSnapshotGroupsService(s *Service) *InstantSnapshotGroupsService { + rs := &InstantSnapshotGroupsService{s: s} + return rs +} + +type InstantSnapshotGroupsService struct { + s *Service +} + func NewInstantSnapshotsService(s *Service) *InstantSnapshotsService { rs := &InstantSnapshotsService{s: s} return rs @@ -1065,6 +1083,15 @@ type RegionHealthChecksService struct { s *Service } +func NewRegionInstanceGroupManagerResizeRequestsService(s *Service) *RegionInstanceGroupManagerResizeRequestsService { + rs := &RegionInstanceGroupManagerResizeRequestsService{s: s} + return rs +} + +type RegionInstanceGroupManagerResizeRequestsService struct { + s *Service +} + func NewRegionInstanceGroupManagersService(s *Service) *RegionInstanceGroupManagersService { rs := &RegionInstanceGroupManagersService{s: s} return rs @@ -1101,6 +1128,15 @@ type RegionInstancesService struct { s *Service } +func NewRegionInstantSnapshotGroupsService(s *Service) *RegionInstantSnapshotGroupsService { + rs := &RegionInstantSnapshotGroupsService{s: s} + return rs +} + +type RegionInstantSnapshotGroupsService struct { + s *Service +} + func NewRegionInstantSnapshotsService(s *Service) *RegionInstantSnapshotsService { rs := &RegionInstantSnapshotsService{s: s} return rs @@ -18973,6 +19009,8 @@ type InstanceGroupManager struct { // Region: [Output Only] The URL of the region where the managed instance group // resides (for regional resources). Region string `json:"region,omitempty"` + // ResourcePolicies: Resource policies for this managed instance group. + ResourcePolicies *InstanceGroupManagerResourcePolicies `json:"resourcePolicies,omitempty"` // SatisfiesPzi: [Output Only] Reserved for future use. SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: [Output Only] Reserved for future use. @@ -20217,6 +20255,33 @@ func (s InstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerResourcePolicies struct { + // WorkloadPolicy: The URL of the workload policy that is specified for this + // managed instance group. It can be a full or partial URL. For example, the + // following are all valid URLs to a workload policy: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /resourcePolicies/resourcePolicy - + // projects/project/regions/region/resourcePolicies/resourcePolicy - + // regions/region/resourcePolicies/resourcePolicy + WorkloadPolicy string `json:"workloadPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "WorkloadPolicy") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagerResourcePolicies) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerResourcePolicies + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerStandbyPolicy struct { // InitialDelaySec: Specifies the number of seconds that the MIG should wait to // suspend or stop a VM after that VM was created. The initial delay gives the @@ -23849,6 +23914,117 @@ func (s InstantSnapshotAggregatedListWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InstantSnapshotGroup struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: Optional. 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#instantSnapshotGroup for InstantSnapshotGroup resources. + Kind string `json:"kind,omitempty"` + // Name: Identifier. Name of the resource; provided by the client when the + // resource is created. The name must be 1-63 characters long, and comply with + // RFC1035. Specifically, the name must be 1-63 characters long and match the + // regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first + // character must be a lowercase letter, and all following characters must be a + // dash, lowercase letter, or digit, except the last character, which cannot be + // a dash. + Name string `json:"name,omitempty"` + // Region: [Output Only] URL of the region where the instant snapshot group + // resides. 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"` + ResourceStatus *InstantSnapshotGroupResourceStatus `json:"resourceStatus,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource's + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Status: [Output Only] + // + // Possible values: + // "CREATING" + // "DELETING" + // "FAILED" + // "INVALID" + // "READY" + // "UNKNOWN" + Status string `json:"status,omitempty"` + // Zone: [Output Only] URL of the zone where the instant snapshot group + // resides. You must specify this field as part of the HTTP request URL. It is + // not settable as a field in the request body. + Zone string `json:"zone,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 InstantSnapshotGroup) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotGroup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type InstantSnapshotGroupResourceStatus struct { + // ConsistencyMembershipResolutionTime: [Output Only] + ConsistencyMembershipResolutionTime string `json:"consistencyMembershipResolutionTime,omitempty"` + // SourceInfo: [Output Only] + SourceInfo *InstantSnapshotGroupSourceInfo `json:"sourceInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "ConsistencyMembershipResolutionTime") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "ConsistencyMembershipResolutionTime") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s InstantSnapshotGroupResourceStatus) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotGroupResourceStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type InstantSnapshotGroupSourceInfo struct { + ConsistencyGroup string `json:"consistencyGroup,omitempty"` + ConsistencyGroupId string `json:"consistencyGroupId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConsistencyGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConsistencyGroup") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstantSnapshotGroupSourceInfo) MarshalJSON() ([]byte, error) { + type NoMethod InstantSnapshotGroupSourceInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstantSnapshotList: Contains a list of InstantSnapshot resources. type InstantSnapshotList struct { // Id: [Output Only] Unique identifier for the resource; defined by the server. @@ -24393,7 +24569,8 @@ func (s Interconnect) MarshalJSON() ([]byte, error) { // enabling Application Aware Interconnect (AAI) on this Cloud Interconnect // connection between Google and your on-premises router. type InterconnectApplicationAwareInterconnect struct { - BandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"bandwidthPercentagePolicy,omitempty"` + BandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"bandwidthPercentagePolicy,omitempty"` + EgressMinBandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"egressMinBandwidthPercentagePolicy,omitempty"` // ProfileDescription: A description for the AAI profile on this interconnect. ProfileDescription string `json:"profileDescription,omitempty"` StrictPriorityPolicy *InterconnectApplicationAwareInterconnectStrictPriorityPolicy `json:"strictPriorityPolicy,omitempty"` @@ -27501,6 +27678,165 @@ func (s LicensesListResponseWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListInstantSnapshotGroups: Contains a list of InstantSnapshotGroup +// resources. +type ListInstantSnapshotGroups struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of InstantSnapshotGroup resources. + Items []*InstantSnapshotGroup `json:"items,omitempty"` + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. end_interface: + // MixerListResponseWithEtagBuilder + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *ListInstantSnapshotGroupsWarning `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 ListInstantSnapshotGroups) MarshalJSON() ([]byte, error) { + type NoMethod ListInstantSnapshotGroups + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListInstantSnapshotGroupsWarning: [Output Only] Informational warning +// message. +type ListInstantSnapshotGroupsWarning 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 []*ListInstantSnapshotGroupsWarningData `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 ListInstantSnapshotGroupsWarning) MarshalJSON() ([]byte, error) { + type NoMethod ListInstantSnapshotGroupsWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ListInstantSnapshotGroupsWarningData 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 ListInstantSnapshotGroupsWarningData) MarshalJSON() ([]byte, error) { + type NoMethod ListInstantSnapshotGroupsWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type LocalDisk struct { // DiskCount: Specifies the number of such disks. DiskCount int64 `json:"diskCount,omitempty"` @@ -29239,7 +29575,8 @@ type MultiMig struct { SelfLink string `json:"selfLink,omitempty"` // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the // resource id. - SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + Status *MultiMigStatus `json:"status,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -29339,6 +29676,26 @@ func (s MultiMigSchedulingPolicy) MarshalJSON() ([]byte, error) { 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. diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index 0a25fd0fc5b..f4881b02787 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -40445,6 +40445,580 @@ func (c *InstancesUpdateShieldedVmConfigCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type InstantSnapshotGroupsDeleteCall struct { + s *Service + project string + zone string + instantSnapshotGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: deletes a Zonal InstantSnapshotGroup resource +// +// - instantSnapshotGroup: Name of the InstantSnapshot resource to delete. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) Delete(project string, zone string, instantSnapshotGroup string) *InstantSnapshotGroupsDeleteCall { + c := &InstantSnapshotGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instantSnapshotGroup = instantSnapshotGroup + 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 *InstantSnapshotGroupsDeleteCall) RequestId(requestId string) *InstantSnapshotGroupsDeleteCall { + 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 *InstantSnapshotGroupsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsDeleteCall) Context(ctx context.Context) *InstantSnapshotGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsDeleteCall) 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}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}") + 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, + "zone": c.zone, + "instantSnapshotGroup": c.instantSnapshotGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.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 *InstantSnapshotGroupsDeleteCall) 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 InstantSnapshotGroupsGetCall struct { + s *Service + project string + zone string + instantSnapshotGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: returns the specified InstantSnapshotGroup resource in the specified +// zone. +// +// - instantSnapshotGroup: Name of the instantSnapshotGroup resource to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) Get(project string, zone string, instantSnapshotGroup string) *InstantSnapshotGroupsGetCall { + c := &InstantSnapshotGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instantSnapshotGroup = instantSnapshotGroup + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstantSnapshotGroupsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsGetCall { + 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 *InstantSnapshotGroupsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsGetCall) Context(ctx context.Context) *InstantSnapshotGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsGetCall) 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}/zones/{zone}/instantSnapshotGroups/{instantSnapshotGroup}") + 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, + "zone": c.zone, + "instantSnapshotGroup": c.instantSnapshotGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstantSnapshotGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotGroup, 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 := &InstantSnapshotGroup{ + 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 InstantSnapshotGroupsInsertCall struct { + s *Service + project string + zone string + instantsnapshotgroup *InstantSnapshotGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: inserts a Zonal InstantSnapshotGroup resource +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *InstantSnapshotGroupsService) Insert(project string, zone string, instantsnapshotgroup *InstantSnapshotGroup) *InstantSnapshotGroupsInsertCall { + c := &InstantSnapshotGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instantsnapshotgroup = instantsnapshotgroup + 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 *InstantSnapshotGroupsInsertCall) RequestId(requestId string) *InstantSnapshotGroupsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SourceConsistencyGroup sets the optional parameter "sourceConsistencyGroup": +// begin_interface: MixerMutationRequestBuilder +func (c *InstantSnapshotGroupsInsertCall) SourceConsistencyGroup(sourceConsistencyGroup string) *InstantSnapshotGroupsInsertCall { + c.urlParams_.Set("sourceConsistencyGroup", sourceConsistencyGroup) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InstantSnapshotGroupsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsInsertCall) Context(ctx context.Context) *InstantSnapshotGroupsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsInsertCall) 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.instantsnapshotgroup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshotGroups") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.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 *InstantSnapshotGroupsInsertCall) 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 InstantSnapshotGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: retrieves the list of InstantSnapshotGroup resources contained within +// the specified zone. +// +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotGroupsService) List(project string, zone string) *InstantSnapshotGroupsListCall { + c := &InstantSnapshotGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + 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 *InstantSnapshotGroupsListCall) Filter(filter string) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) MaxResults(maxResults int64) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) OrderBy(orderBy string) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) PageToken(pageToken string) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) Fields(s ...googleapi.Field) *InstantSnapshotGroupsListCall { + 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 *InstantSnapshotGroupsListCall) IfNoneMatch(entityTag string) *InstantSnapshotGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotGroupsListCall) Context(ctx context.Context) *InstantSnapshotGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotGroupsListCall) 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}/zones/{zone}/instantSnapshotGroups") + 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, + "zone": c.zone, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshotGroups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInstantSnapshotGroups.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstantSnapshotGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInstantSnapshotGroups, 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 := &ListInstantSnapshotGroups{ + 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 *InstantSnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListInstantSnapshotGroups) 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 InstantSnapshotsAggregatedListCall struct { s *Service project string diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index 4fd128015f5..a105097e822 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -7629,6 +7629,257 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } +type RegionInstanceGroupManagerResizeRequestsGetCall struct { + s *Service + project string + region string + instanceGroupManager string + resizeRequest string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns all of the details about the specified resize request. +// +// - instanceGroupManager: The name of the managed instance group. Name should +// conform to RFC1035 or be a resource ID. +// - project: Project ID for this request. +// - region: The name of the region scoping this request. Name should conform +// to RFC1035. +// - resizeRequest: The name of the resize request. Name should conform to +// RFC1035 or be a resource ID. +func (r *RegionInstanceGroupManagerResizeRequestsService) Get(project string, region string, instanceGroupManager string, resizeRequest string) *RegionInstanceGroupManagerResizeRequestsGetCall { + c := &RegionInstanceGroupManagerResizeRequestsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.resizeRequest = resizeRequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsGetCall { + 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 *RegionInstanceGroupManagerResizeRequestsGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagerResizeRequestsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagerResizeRequestsGetCall) 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}/instanceGroupManagers/{instanceGroupManager}/resizeRequests/{resizeRequest}") + 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, + "instanceGroupManager": c.instanceGroupManager, + "resizeRequest": c.resizeRequest, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagerResizeRequests.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceGroupManagerResizeRequest.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagerResizeRequestsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManagerResizeRequest, 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 := &InstanceGroupManagerResizeRequest{ + 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 RegionInstanceGroupManagerResizeRequestsInsertCall struct { + s *Service + project string + region string + instanceGroupManager string + instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a new Resize Request that starts provisioning VMs +// immediately or queues VM creation. +// +// - instanceGroupManager: Name of the managed instance group to which the +// resize request is scoped. Name should conform to RFC1035 or be a resource +// ID. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. Name should conform to +// RFC1035. +func (r *RegionInstanceGroupManagerResizeRequestsService) Insert(project string, region string, instanceGroupManager string, instancegroupmanagerresizerequest *InstanceGroupManagerResizeRequest) *RegionInstanceGroupManagerResizeRequestsInsertCall { + c := &RegionInstanceGroupManagerResizeRequestsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerresizerequest = instancegroupmanagerresizerequest + 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 *RegionInstanceGroupManagerResizeRequestsInsertCall) RequestId(requestId string) *RegionInstanceGroupManagerResizeRequestsInsertCall { + 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 *RegionInstanceGroupManagerResizeRequestsInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagerResizeRequestsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagerResizeRequestsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagerResizeRequestsInsertCall) 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.instancegroupmanagerresizerequest) + 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}/instanceGroupManagers/{instanceGroupManager}/resizeRequests") + 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, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagerResizeRequests.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 *RegionInstanceGroupManagerResizeRequestsInsertCall) 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 RegionInstanceGroupManagersAbandonInstancesCall struct { s *Service project string @@ -12917,6 +13168,580 @@ func (c *RegionInstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } +type RegionInstantSnapshotGroupsDeleteCall struct { + s *Service + project string + region string + instantSnapshotGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: deletes a Regional InstantSnapshotGroup resource +// +// - instantSnapshotGroup: Name of the InstantSnapshotGroup resource to delete. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstantSnapshotGroupsService) Delete(project string, region string, instantSnapshotGroup string) *RegionInstantSnapshotGroupsDeleteCall { + c := &RegionInstantSnapshotGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instantSnapshotGroup = instantSnapshotGroup + 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 *RegionInstantSnapshotGroupsDeleteCall) RequestId(requestId string) *RegionInstantSnapshotGroupsDeleteCall { + 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 *RegionInstantSnapshotGroupsDeleteCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsDeleteCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsDeleteCall) 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}/instantSnapshotGroups/{instantSnapshotGroup}") + 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, + "instantSnapshotGroup": c.instantSnapshotGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshotGroups.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 *RegionInstantSnapshotGroupsDeleteCall) 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 RegionInstantSnapshotGroupsGetCall struct { + s *Service + project string + region string + instantSnapshot string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: returns the specified InstantSnapshotGroup resource in the specified +// region. +// +// - instantSnapshot: Name of the InstantSnapshotGroup resource to return. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstantSnapshotGroupsService) Get(project string, region string, instantSnapshot string) *RegionInstantSnapshotGroupsGetCall { + c := &RegionInstantSnapshotGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instantSnapshot = instantSnapshot + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstantSnapshotGroupsGetCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsGetCall { + 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 *RegionInstantSnapshotGroupsGetCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsGetCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsGetCall) 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}/instantSnapshotGroups/{instantSnapshot}") + 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, + "instantSnapshot": c.instantSnapshot, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstantSnapshotGroups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstantSnapshotGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionInstantSnapshotGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotGroup, 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 := &InstantSnapshotGroup{ + 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 RegionInstantSnapshotGroupsInsertCall struct { + s *Service + project string + region string + instantsnapshotgroup *InstantSnapshotGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: creates a Regional InstantSnapshotGroup resource +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *RegionInstantSnapshotGroupsService) Insert(project string, region string, instantsnapshotgroup *InstantSnapshotGroup) *RegionInstantSnapshotGroupsInsertCall { + c := &RegionInstantSnapshotGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instantsnapshotgroup = instantsnapshotgroup + 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 *RegionInstantSnapshotGroupsInsertCall) RequestId(requestId string) *RegionInstantSnapshotGroupsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SourceConsistencyGroup sets the optional parameter "sourceConsistencyGroup": +// begin_interface: MixerMutationRequestBuilder +func (c *RegionInstantSnapshotGroupsInsertCall) SourceConsistencyGroup(sourceConsistencyGroup string) *RegionInstantSnapshotGroupsInsertCall { + c.urlParams_.Set("sourceConsistencyGroup", sourceConsistencyGroup) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstantSnapshotGroupsInsertCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsInsertCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsInsertCall) 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.instantsnapshotgroup) + 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}/instantSnapshotGroups") + 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.regionInstantSnapshotGroups.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 *RegionInstantSnapshotGroupsInsertCall) 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 RegionInstantSnapshotGroupsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: retrieves the list of InstantSnapshotGroup resources contained within +// the specified region. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionInstantSnapshotGroupsService) List(project string, region string) *RegionInstantSnapshotGroupsListCall { + c := &RegionInstantSnapshotGroupsListCall{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 *RegionInstantSnapshotGroupsListCall) Filter(filter string) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) MaxResults(maxResults int64) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) OrderBy(orderBy string) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) PageToken(pageToken string) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) Fields(s ...googleapi.Field) *RegionInstantSnapshotGroupsListCall { + 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 *RegionInstantSnapshotGroupsListCall) IfNoneMatch(entityTag string) *RegionInstantSnapshotGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstantSnapshotGroupsListCall) Context(ctx context.Context) *RegionInstantSnapshotGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstantSnapshotGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstantSnapshotGroupsListCall) 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}/instantSnapshotGroups") + 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.regionInstantSnapshotGroups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInstantSnapshotGroups.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstantSnapshotGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInstantSnapshotGroups, 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 := &ListInstantSnapshotGroups{ + 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 *RegionInstantSnapshotGroupsListCall) Pages(ctx context.Context, f func(*ListInstantSnapshotGroups) 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 RegionInstantSnapshotsDeleteCall struct { s *Service project string diff --git a/config/v1/config-api.json b/config/v1/config-api.json index 6f6fe39f930..aea82befd42 100644 --- a/config/v1/config-api.json +++ b/config/v1/config-api.json @@ -1187,7 +1187,7 @@ } } }, - "revision": "20240424", + "revision": "20240710", "rootUrl": "https://config.googleapis.com/", "schemas": { "ApplyResults": { @@ -2545,12 +2545,12 @@ "id": "TerraformBlueprint", "properties": { "gcsSource": { - "description": "Required. URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}`", + "description": "URI of an object in Google Cloud Storage. Format: `gs://{bucket}/{object}` URI may also specify an object version for zipped objects. Format: `gs://{bucket}/{object}#{version}`", "type": "string" }, "gitSource": { "$ref": "GitSource", - "description": "Required. URI of a public Git repo." + "description": "URI of a public Git repo." }, "inputValues": { "additionalProperties": { diff --git a/config/v1/config-gen.go b/config/v1/config-gen.go index 0143914168d..d970f7e10b7 100644 --- a/config/v1/config-gen.go +++ b/config/v1/config-gen.go @@ -1866,11 +1866,11 @@ func (s Status) MarshalJSON() ([]byte, error) { // TerraformBlueprint: TerraformBlueprint describes the source of a Terraform // root module which describes the resources and configs to be deployed. type TerraformBlueprint struct { - // GcsSource: Required. URI of an object in Google Cloud Storage. Format: + // GcsSource: URI of an object in Google Cloud Storage. Format: // `gs://{bucket}/{object}` URI may also specify an object version for zipped // objects. Format: `gs://{bucket}/{object}#{version}` GcsSource string `json:"gcsSource,omitempty"` - // GitSource: Required. URI of a public Git repo. + // GitSource: URI of a public Git repo. GitSource *GitSource `json:"gitSource,omitempty"` // InputValues: Input variable values for the Terraform blueprint. InputValues map[string]TerraformVariable `json:"inputValues,omitempty"` diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index f4a6ac49079..6567fa406af 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -2427,7 +2427,7 @@ } } }, - "revision": "20240708", + "revision": "20240715", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2826,6 +2826,10 @@ "description": "Connection represents an instance of connector.", "id": "Connection", "properties": { + "asyncOperationsEnabled": { + "description": "Optional. Async operations enabled for the connection. If Async Operations is enabled, Connection allows the customers to initiate async long running operations using the actions API.", + "type": "boolean" + }, "authConfig": { "$ref": "AuthConfig", "description": "Optional. Configuration for establishing the connection's authentication with an external system." @@ -3252,6 +3256,10 @@ "format": "int64", "type": "string" }, + "migrateDeploymentModel": { + "description": "Indicate whether connector is being migrated to cloud run deployment model.", + "type": "boolean" + }, "ratelimitThreshold": { "description": "Max QPS supported by the connector version before throttling of requests.", "format": "int64", @@ -3448,6 +3456,23 @@ ], "type": "string" }, + "deploymentModelMigrationState": { + "description": "Output only. Status of the deployment model migration.", + "enum": [ + "DEPLOYMENT_MODEL_MIGRATION_STATE_UNSPECIFIED", + "IN_PROGRESS", + "COMPLETED", + "ROLLEDBACK" + ], + "enumDescriptions": [ + "Deployment model migration state is not specified.", + "Deployment model migration is in progress.", + "Deployment model migration is completed.", + "Deployment model migration rolledback." + ], + "readOnly": true, + "type": "string" + }, "hpaConfig": { "$ref": "HPAConfig", "description": "Output only. HPA autoscaling config.", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 573860e8296..f74bc4714f0 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -830,6 +830,10 @@ func (s ConfigVariableTemplate) MarshalJSON() ([]byte, error) { // Connection: Connection represents an instance of connector. type Connection struct { + // AsyncOperationsEnabled: Optional. Async operations enabled for the + // connection. If Async Operations is enabled, Connection allows the customers + // to initiate async long running operations using the actions API. + AsyncOperationsEnabled bool `json:"asyncOperationsEnabled,omitempty"` // AuthConfig: Optional. Configuration for establishing the connection's // authentication with an external system. AuthConfig *AuthConfig `json:"authConfig,omitempty"` @@ -930,15 +934,15 @@ type Connection struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuthConfig") to + // ForceSendFields is a list of field names (e.g. "AsyncOperationsEnabled") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthConfig") 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. "AsyncOperationsEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1128,6 +1132,9 @@ type ConnectorInfraConfig struct { // InternalclientRatelimitThreshold: Max QPS supported for internal requests // originating from Connd. InternalclientRatelimitThreshold int64 `json:"internalclientRatelimitThreshold,omitempty,string"` + // MigrateDeploymentModel: Indicate whether connector is being migrated to + // cloud run deployment model. + MigrateDeploymentModel bool `json:"migrateDeploymentModel,omitempty"` // RatelimitThreshold: Max QPS supported by the connector version before // throttling of requests. RatelimitThreshold int64 `json:"ratelimitThreshold,omitempty,string"` @@ -1264,6 +1271,16 @@ type ConnectorVersionInfraConfig struct { // "GKE_MST" - Default model gke mst. // "CLOUD_RUN_MST" - Cloud run mst. DeploymentModel string `json:"deploymentModel,omitempty"` + // DeploymentModelMigrationState: Output only. Status of the deployment model + // migration. + // + // Possible values: + // "DEPLOYMENT_MODEL_MIGRATION_STATE_UNSPECIFIED" - Deployment model + // migration state is not specified. + // "IN_PROGRESS" - Deployment model migration is in progress. + // "COMPLETED" - Deployment model migration is completed. + // "ROLLEDBACK" - Deployment model migration rolledback. + DeploymentModelMigrationState string `json:"deploymentModelMigrationState,omitempty"` // HpaConfig: Output only. HPA autoscaling config. HpaConfig *HPAConfig `json:"hpaConfig,omitempty"` // InternalclientRatelimitThreshold: Output only. Max QPS supported for diff --git a/container/v1/container-api.json b/container/v1/container-api.json index a07cee9ff93..1f6e9adab23 100644 --- a/container/v1/container-api.json +++ b/container/v1/container-api.json @@ -2540,7 +2540,7 @@ } } }, - "revision": "20240619", + "revision": "20240708", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2610,7 +2610,7 @@ "id": "AdditionalPodRangesConfig", "properties": { "podRangeInfo": { - "description": "Output only. [Output only] Information for additional pod range.", + "description": "Output only. Information for additional pod range.", "items": { "$ref": "RangeInfo" }, @@ -2754,11 +2754,13 @@ "id": "AutoUpgradeOptions", "properties": { "autoUpgradeStartTime": { - "description": "[Output only] This field is set when upgrades are about to commence with the approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. This field is set when upgrades are about to commence with the approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "description": { - "description": "[Output only] This field is set when upgrades are about to commence with the description of the upgrade.", + "description": "Output only. This field is set when upgrades are about to commence with the description of the upgrade.", + "readOnly": true, "type": "string" } }, @@ -3161,22 +3163,26 @@ "description": "Configuration for the fine-grained cost management feature." }, "createTime": { - "description": "[Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", + "description": "Output only. The current software version of the master endpoint.", + "readOnly": true, "type": "string" }, "currentNodeCount": { "deprecated": true, - "description": "[Output only] The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information.", + "description": "Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information.", "format": "int32", + "readOnly": true, "type": "integer" }, "currentNodeVersion": { "deprecated": true, - "description": "[Output only] Deprecated, use [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes.", + "description": "Output only. Deprecated, use [NodePools.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes.", + "readOnly": true, "type": "string" }, "databaseEncryption": { @@ -3204,7 +3210,8 @@ "type": "boolean" }, "endpoint": { - "description": "[Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.", + "description": "Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.", + "readOnly": true, "type": "string" }, "enterpriseConfig": { @@ -3216,7 +3223,8 @@ "type": "string" }, "expireTime": { - "description": "[Output only] The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "fleet": { @@ -3244,10 +3252,11 @@ }, "instanceGroupUrls": { "deprecated": true, - "description": "Deprecated. Use node_pools.instance_group_urls.", + "description": "Output only. Deprecated. Use node_pools.instance_group_urls.", "items": { "type": "string" }, + "readOnly": true, "type": "array" }, "ipAllocationPolicy": { @@ -3263,7 +3272,8 @@ "description": "Configuration for the legacy ABAC authorization mode." }, "location": { - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "readOnly": true, "type": "string" }, "locations": { @@ -3327,8 +3337,9 @@ "description": "Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"initial_node_count\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see `node_pool.config`) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead." }, "nodeIpv4CidrSize": { - "description": "[Output only] The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode.", + "description": "Output only. The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode.", "format": "int32", + "readOnly": true, "type": "integer" }, "nodePoolAutoConfig": { @@ -3388,11 +3399,13 @@ "description": "Enable/Disable Security Posture API features for the cluster." }, "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", + "description": "Output only. Server-defined URL for the resource.", + "readOnly": true, "type": "string" }, "servicesIpv4Cidr": { - "description": "[Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR.", + "description": "Output only. The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR.", + "readOnly": true, "type": "string" }, "shieldedNodes": { @@ -3400,7 +3413,7 @@ "description": "Shielded Nodes configuration." }, "status": { - "description": "[Output only] The current status of this cluster.", + "description": "Output only. The current status of this cluster.", "enum": [ "STATUS_UNSPECIFIED", "PROVISIONING", @@ -3419,11 +3432,13 @@ "The ERROR state indicates the cluster is unusable. It will be automatically deleted. Details can be found in the `statusMessage` field.", "The DEGRADED state indicates the cluster requires user action to restore full functionality. Details can be found in the `statusMessage` field." ], + "readOnly": true, "type": "string" }, "statusMessage": { "deprecated": true, - "description": "[Output only] Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available.", + "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available.", + "readOnly": true, "type": "string" }, "subnetwork": { @@ -3431,7 +3446,8 @@ "type": "string" }, "tpuIpv4CidrBlock": { - "description": "[Output only] The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`).", + "description": "Output only. The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`).", + "readOnly": true, "type": "string" }, "verticalPodAutoscaling": { @@ -3444,7 +3460,8 @@ }, "zone": { "deprecated": true, - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead.", + "readOnly": true, "type": "string" } }, @@ -3984,7 +4001,8 @@ "id": "DailyMaintenanceWindow", "properties": { "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario. Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format \"PTnHnMnS\".", + "description": "Output only. Duration of the time window, automatically chosen to be smallest possible in the given scenario. Duration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format \"PTnHnMnS\".", + "readOnly": true, "type": "string" }, "startTime": { @@ -4091,7 +4109,7 @@ "id": "EnterpriseConfig", "properties": { "clusterTier": { - "description": "Output only. [Output only] cluster_tier specifies the premium tier of the cluster.", + "description": "Output only. cluster_tier specifies the premium tier of the cluster.", "enum": [ "CLUSTER_TIER_UNSPECIFIED", "STANDARD", @@ -4162,11 +4180,13 @@ "id": "Fleet", "properties": { "membership": { - "description": "[Output only] The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.", + "description": "Output only. The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.", + "readOnly": true, "type": "string" }, "preRegistered": { - "description": "[Output only] Whether the cluster has been registered through the fleet API.", + "description": "Output only. Whether the cluster has been registered through the fleet API.", + "readOnly": true, "type": "boolean" }, "project": { @@ -4468,7 +4488,7 @@ "properties": { "additionalPodRangesConfig": { "$ref": "AdditionalPodRangesConfig", - "description": "Output only. [Output only] The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.", + "description": "Output only. The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.", "readOnly": true }, "clusterIpv4Cidr": { @@ -4489,7 +4509,7 @@ "type": "boolean" }, "defaultPodIpv4RangeUtilization": { - "description": "Output only. [Output only] The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", + "description": "Output only. The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", "format": "double", "readOnly": true, "type": "number" @@ -4531,7 +4551,7 @@ "type": "string" }, "servicesIpv6CidrBlock": { - "description": "Output only. [Output only] The services IPv6 CIDR block for the cluster.", + "description": "Output only. The services IPv6 CIDR block for the cluster.", "readOnly": true, "type": "string" }, @@ -4554,7 +4574,7 @@ "type": "string" }, "subnetIpv6CidrBlock": { - "description": "Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods.", + "description": "Output only. The subnet's IPv6 CIDR block used by nodes and pods.", "readOnly": true, "type": "string" }, @@ -4932,7 +4952,8 @@ "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.", + "readOnly": true, "type": "string" }, "clientCertificateConfig": { @@ -4940,11 +4961,13 @@ "description": "Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued." }, "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded private key used by clients to authenticate to the cluster endpoint.", + "readOnly": true, "type": "string" }, "clusterCaCertificate": { - "description": "[Output only] Base64-encoded public certificate that is the root of trust for the cluster.", + "description": "Output only. Base64-encoded public certificate that is the root of trust for the cluster.", + "readOnly": true, "type": "string" }, "password": { @@ -5161,6 +5184,7 @@ }, "network": { "description": "Output only. The relative name of the Google Compute Engine network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network", + "readOnly": true, "type": "string" }, "networkPerformanceConfig": { @@ -5189,6 +5213,7 @@ }, "subnetwork": { "description": "Output only. The relative name of the Google Compute Engine [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet", + "readOnly": true, "type": "string" } }, @@ -5605,7 +5630,7 @@ "type": "string" }, "podIpv4RangeUtilization": { - "description": "Output only. [Output only] The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", + "description": "Output only. The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", "format": "double", "readOnly": true, "type": "number" @@ -5650,10 +5675,11 @@ "type": "integer" }, "instanceGroupUrls": { - "description": "[Output only] The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", + "description": "Output only. The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", "items": { "type": "string" }, + "readOnly": true, "type": "array" }, "locations": { @@ -5684,8 +5710,9 @@ "description": "Specifies the node placement policy." }, "podIpv4CidrSize": { - "description": "[Output only] The pod CIDR block size per node in this node pool.", + "description": "Output only. The pod CIDR block size per node in this node pool.", "format": "int32", + "readOnly": true, "type": "integer" }, "queuedProvisioning": { @@ -5693,11 +5720,12 @@ "description": "Specifies the configuration of queued provisioning." }, "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", + "description": "Output only. Server-defined URL for the resource.", + "readOnly": true, "type": "string" }, "status": { - "description": "[Output only] The status of the nodes in this pool instance.", + "description": "Output only. The status of the nodes in this pool instance.", "enum": [ "STATUS_UNSPECIFIED", "PROVISIONING", @@ -5716,16 +5744,18 @@ "The STOPPING state indicates the node pool is being deleted.", "The ERROR state indicates the node pool may be unusable. Details can be found in the `statusMessage` field." ], + "readOnly": true, "type": "string" }, "statusMessage": { "deprecated": true, - "description": "[Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", + "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", + "readOnly": true, "type": "string" }, "updateInfo": { "$ref": "UpdateInfo", - "description": "Output only. [Output only] Update info contains relevant information during a node pool update.", + "description": "Output only. Update info contains relevant information during a node pool update.", "readOnly": true }, "upgradeSettings": { @@ -5898,11 +5928,13 @@ "type": "array" }, "detail": { - "description": "Detailed operation progress, if available.", + "description": "Output only. Detailed operation progress, if available.", + "readOnly": true, "type": "string" }, "endTime": { - "description": "[Output only] The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "error": { @@ -5910,11 +5942,13 @@ "description": "The error result of the operation in case of failure." }, "location": { - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "readOnly": true, "type": "string" }, "name": { - "description": "The server-assigned ID for the operation.", + "description": "Output only. The server-assigned ID for the operation.", + "readOnly": true, "type": "string" }, "nodepoolConditions": { @@ -5926,7 +5960,7 @@ "type": "array" }, "operationType": { - "description": "The operation type.", + "description": "Output only. The operation type.", "enum": [ "TYPE_UNSPECIFIED", "CREATE_CLUSTER", @@ -5990,23 +6024,26 @@ "The control plane is being resized. This operation type is initiated by GKE. These operations are often performed preemptively to ensure that the control plane has sufficient resources and is not typically an indication of issues. For more details, see [documentation on resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).", "Fleet features of GKE Enterprise are being upgraded. The cluster should be assumed to be blocked for other upgrades until the operation finishes." ], + "readOnly": true, "type": "string" }, "progress": { "$ref": "OperationProgress", - "description": "Output only. [Output only] Progress information for an operation.", + "description": "Output only. Progress information for an operation.", "readOnly": true }, "selfLink": { - "description": "Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.", + "description": "Output only. Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.", + "readOnly": true, "type": "string" }, "startTime": { - "description": "[Output only] The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "status": { - "description": "The current status of the operation.", + "description": "Output only. The current status of the operation.", "enum": [ "STATUS_UNSPECIFIED", "PENDING", @@ -6021,6 +6058,7 @@ "The operation is done, either cancelled or completed.", "The operation is aborting." ], + "readOnly": true, "type": "string" }, "statusMessage": { @@ -6030,12 +6068,14 @@ "type": "string" }, "targetLink": { - "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "description": "Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "readOnly": true, "type": "string" }, "zone": { "deprecated": true, - "description": "The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.", + "readOnly": true, "type": "string" } }, @@ -6182,10 +6222,12 @@ }, "peeringName": { "description": "Output only. The peering name in the customer VPC used by this cluster.", + "readOnly": true, "type": "string" }, "privateEndpoint": { "description": "Output only. The internal IP address of this cluster's master endpoint.", + "readOnly": true, "type": "string" }, "privateEndpointSubnetwork": { @@ -6194,6 +6236,7 @@ }, "publicEndpoint": { "description": "Output only. The external IP address of this cluster's master endpoint.", + "readOnly": true, "type": "string" } }, @@ -6263,12 +6306,12 @@ "id": "RangeInfo", "properties": { "rangeName": { - "description": "Output only. [Output only] Name of a range.", + "description": "Output only. Name of a range.", "readOnly": true, "type": "string" }, "utilization": { - "description": "Output only. [Output only] The utilization of the range.", + "description": "Output only. The utilization of the range.", "format": "double", "readOnly": true, "type": "number" @@ -6342,13 +6385,15 @@ "UNSPECIFIED", "RAPID", "REGULAR", - "STABLE" + "STABLE", + "EXTENDED" ], "enumDescriptions": [ "No channel specified.", "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production." + "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", + "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." ], "type": "string" } @@ -6365,13 +6410,15 @@ "UNSPECIFIED", "RAPID", "REGULAR", - "STABLE" + "STABLE", + "EXTENDED" ], "enumDescriptions": [ "No channel specified.", "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production." + "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", + "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." ], "type": "string" }, diff --git a/container/v1/container-gen.go b/container/v1/container-gen.go index e844e3513dc..50fed970a39 100644 --- a/container/v1/container-gen.go +++ b/container/v1/container-gen.go @@ -389,8 +389,7 @@ func (s AdditionalPodNetworkConfig) MarshalJSON() ([]byte, error) { // AdditionalPodRangesConfig: AdditionalPodRangesConfig is the configuration // for additional pod secondary ranges supporting the ClusterUpdate message. type AdditionalPodRangesConfig struct { - // PodRangeInfo: Output only. [Output only] Information for additional pod - // range. + // PodRangeInfo: Output only. Information for additional pod range. PodRangeInfo []*RangeInfo `json:"podRangeInfo,omitempty"` // PodRangeNames: Name for pod secondary ipv4 range which has the actual range // defined ahead. @@ -566,11 +565,11 @@ func (s AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for the // user to control how the Auto Upgrades will proceed. type AutoUpgradeOptions struct { - // AutoUpgradeStartTime: [Output only] This field is set when upgrades are - // about to commence with the approximate start time for the upgrades, in - // RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. + // AutoUpgradeStartTime: Output only. This field is set when upgrades are about + // to commence with the approximate start time for the upgrades, in RFC3339 + // (https://www.ietf.org/rfc/rfc3339.txt) text format. AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` - // Description: [Output only] This field is set when upgrades are about to + // Description: Output only. This field is set when upgrades are about to // commence with the description of the upgrade. Description string `json:"description,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoUpgradeStartTime") to @@ -1081,17 +1080,16 @@ type Cluster struct { // CostManagementConfig: Configuration for the fine-grained cost management // feature. CostManagementConfig *CostManagementConfig `json:"costManagementConfig,omitempty"` - // CreateTime: [Output only] The time the cluster was created, in RFC3339 + // CreateTime: Output only. The time the cluster was created, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. CreateTime string `json:"createTime,omitempty"` - // CurrentMasterVersion: [Output only] The current software version of the + // CurrentMasterVersion: Output only. The current software version of the // master endpoint. CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` - // CurrentNodeCount: [Output only] The number of nodes currently in the - // cluster. Deprecated. Call Kubernetes API directly to retrieve node - // information. + // CurrentNodeCount: Output only. The number of nodes currently in the cluster. + // Deprecated. Call Kubernetes API directly to retrieve node information. CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` - // CurrentNodeVersion: [Output only] Deprecated, use NodePools.version + // CurrentNodeVersion: Output only. Deprecated, use NodePools.version // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools) // instead. The current version of the node software components. If they are // currently at multiple versions because they're in the process of being @@ -1116,8 +1114,8 @@ type Cluster struct { EnableKubernetesAlpha bool `json:"enableKubernetesAlpha,omitempty"` // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. EnableTpu bool `json:"enableTpu,omitempty"` - // Endpoint: [Output only] The IP address of this cluster's master endpoint. - // The endpoint can be accessed from the internet at + // Endpoint: Output only. The IP address of this cluster's master endpoint. The + // endpoint can be accessed from the internet at // `https://username:password@endpoint/`. See the `masterAuth` property of this // resource for username and password information. Endpoint string `json:"endpoint,omitempty"` @@ -1127,7 +1125,7 @@ type Cluster struct { // fields, and may be sent on update requests to ensure the client has an // up-to-date value before proceeding. Etag string `json:"etag,omitempty"` - // ExpireTime: [Output only] The time the cluster will be automatically deleted + // ExpireTime: Output only. The time the cluster will be automatically deleted // in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. ExpireTime string `json:"expireTime,omitempty"` // Fleet: Fleet information for the cluster. @@ -1157,7 +1155,8 @@ type Cluster struct { // a node_pool at the same time. This field is deprecated, use // node_pool.initial_node_count instead. InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls. + // InstanceGroupUrls: Output only. Deprecated. Use + // node_pools.instance_group_urls. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` // IpAllocationPolicy: Configuration for cluster IP allocation. IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` @@ -1165,7 +1164,7 @@ type Cluster struct { LabelFingerprint string `json:"labelFingerprint,omitempty"` // LegacyAbac: Configuration for the legacy ABAC authorization mode. LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` - // Location: [Output only] The name of the Google Compute Engine zone + // Location: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // or region // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) @@ -1238,7 +1237,7 @@ type Cluster struct { // node pool, see `node_pool.config`) If unspecified, the defaults are used. // This field is deprecated, use node_pool.config instead. NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` - // NodeIpv4CidrSize: [Output only] The size of the address space on each node + // NodeIpv4CidrSize: Output only. The size of the address space on each node // for hosting containers. This is provisioned from within the // `container_ipv4_cidr` range. This field will only be set when cluster is in // route-based network mode. @@ -1281,9 +1280,9 @@ type Cluster struct { // SecurityPostureConfig: Enable/Disable Security Posture API features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. + // SelfLink: Output only. Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // ServicesIpv4Cidr: [Output only] The IP address range of the Kubernetes + // ServicesIpv4Cidr: Output only. The IP address range of the Kubernetes // services in this cluster, in CIDR // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. // `1.2.3.4/29`). Service addresses are typically put in the last `/16` from @@ -1291,7 +1290,7 @@ type Cluster struct { ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` // ShieldedNodes: Shielded Nodes configuration. ShieldedNodes *ShieldedNodes `json:"shieldedNodes,omitempty"` - // Status: [Output only] The current status of this cluster. + // Status: Output only. The current status of this cluster. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -1309,14 +1308,14 @@ type Cluster struct { // to restore full functionality. Details can be found in the `statusMessage` // field. Status string `json:"status,omitempty"` - // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional + // StatusMessage: Output only. Deprecated. Use conditions instead. Additional // information about the current status of this cluster, if available. StatusMessage string `json:"statusMessage,omitempty"` // Subnetwork: The name of the Google Compute Engine subnetwork // (https://cloud.google.com/compute/docs/subnetworks) to which the cluster is // connected. Subnetwork string `json:"subnetwork,omitempty"` - // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud TPUs in + // TpuIpv4CidrBlock: Output only. The IP address range of the Cloud TPUs in // this cluster, in CIDR // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. // `1.2.3.4/29`). @@ -1327,7 +1326,7 @@ type Cluster struct { // WorkloadIdentityConfig: Configuration for the use of Kubernetes Service // Accounts in GCP IAM policies. WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` - // Zone: [Output only] The name of the Google Compute Engine zone + // Zone: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. This field is deprecated, use location instead. Zone string `json:"zone,omitempty"` @@ -1943,7 +1942,7 @@ func (s DNSConfig) MarshalJSON() ([]byte, error) { // DailyMaintenanceWindow: Time window specified for daily maintenance // operations. type DailyMaintenanceWindow struct { - // Duration: [Output only] Duration of the time window, automatically chosen to + // Duration: Output only. Duration of the time window, automatically chosen to // be smallest possible in the given scenario. Duration will be in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) format "PTnHnMnS". Duration string `json:"duration,omitempty"` @@ -2081,8 +2080,8 @@ type Empty struct { // EnterpriseConfig: EnterpriseConfig is the cluster enterprise configuration. type EnterpriseConfig struct { - // ClusterTier: Output only. [Output only] cluster_tier specifies the premium - // tier of the cluster. + // ClusterTier: Output only. cluster_tier specifies the premium tier of the + // cluster. // // Possible values: // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier @@ -2199,11 +2198,11 @@ func (s Filter) MarshalJSON() ([]byte, error) { // Fleet: Fleet is the fleet configuration for the cluster. type Fleet struct { - // Membership: [Output only] The full resource name of the registered fleet + // Membership: Output only. The full resource name of the registered fleet // membership of the cluster, in the format // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. Membership string `json:"membership,omitempty"` - // PreRegistered: [Output only] Whether the cluster has been registered through + // PreRegistered: Output only. Whether the cluster has been registered through // the fleet API. PreRegistered bool `json:"preRegistered,omitempty"` // Project: The Fleet host project(project ID or project number) where this @@ -2663,10 +2662,10 @@ func (s ILBSubsettingConfig) MarshalJSON() ([]byte, error) { // IPAllocationPolicy: Configuration for controlling how IPs are allocated in // the cluster. type IPAllocationPolicy struct { - // AdditionalPodRangesConfig: Output only. [Output only] The additional pod - // ranges that are added to the cluster. These pod ranges can be used by new - // node pools to allocate pod IPs automatically. Once the range is removed it - // will not show up in IPAllocationPolicy. + // AdditionalPodRangesConfig: Output only. The additional pod ranges that are + // added to the cluster. These pod ranges can be used by new node pools to + // allocate pod IPs automatically. Once the range is removed it will not show + // up in IPAllocationPolicy. AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` // ClusterIpv4Cidr: This field is deprecated, use cluster_ipv4_cidr_block. ClusterIpv4Cidr string `json:"clusterIpv4Cidr,omitempty"` @@ -2688,10 +2687,9 @@ type IPAllocationPolicy struct { // CreateSubnetwork: Whether a new subnetwork will be created automatically for // the cluster. This field is only applicable when `use_ip_aliases` is true. CreateSubnetwork bool `json:"createSubnetwork,omitempty"` - // DefaultPodIpv4RangeUtilization: Output only. [Output only] The utilization - // of the cluster default IPv4 range for the pod. The ratio is Usage/[Total - // number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. + // DefaultPodIpv4RangeUtilization: Output only. The utilization of the cluster + // default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in + // the secondary range], Usage=numNodes*numZones*podIPsPerNode. DefaultPodIpv4RangeUtilization float64 `json:"defaultPodIpv4RangeUtilization,omitempty"` // Ipv6AccessType: The ipv6 access type (internal or external) when // create_subnetwork is true @@ -2732,8 +2730,8 @@ type IPAllocationPolicy struct { // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` - // ServicesIpv6CidrBlock: Output only. [Output only] The services IPv6 CIDR - // block for the cluster. + // ServicesIpv6CidrBlock: Output only. The services IPv6 CIDR block for the + // cluster. ServicesIpv6CidrBlock string `json:"servicesIpv6CidrBlock,omitempty"` // ServicesSecondaryRangeName: The name of the secondary range to be used as // for the services CIDR block. The secondary range will be used for service @@ -2748,8 +2746,8 @@ type IPAllocationPolicy struct { // "IPV4" - Cluster is IPV4 only // "IPV4_IPV6" - Cluster can use both IPv4 and IPv6 StackType string `json:"stackType,omitempty"` - // SubnetIpv6CidrBlock: Output only. [Output only] The subnet's IPv6 CIDR block - // used by nodes and pods. + // SubnetIpv6CidrBlock: Output only. The subnet's IPv6 CIDR block used by nodes + // and pods. SubnetIpv6CidrBlock string `json:"subnetIpv6CidrBlock,omitempty"` // SubnetworkName: A custom subnetwork name to be used if `create_subnetwork` // is true. If this field is empty, then an automatic name will be chosen for @@ -3355,18 +3353,18 @@ func (s ManagedPrometheusConfig) MarshalJSON() ([]byte, error) { // endpoint. Authentication can be done using HTTP basic auth or using client // certificates. type MasterAuth struct { - // ClientCertificate: [Output only] Base64-encoded public certificate used by + // ClientCertificate: Output only. Base64-encoded public certificate used by // clients to authenticate to the cluster endpoint. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, // a client certificate is issued. ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` - // ClientKey: [Output only] Base64-encoded private key used by clients to + // ClientKey: Output only. Base64-encoded private key used by clients to // authenticate to the cluster endpoint. ClientKey string `json:"clientKey,omitempty"` - // ClusterCaCertificate: [Output only] Base64-encoded public certificate that - // is the root of trust for the cluster. + // ClusterCaCertificate: Output only. Base64-encoded public certificate that is + // the root of trust for the cluster. ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` // Password: The password to use for HTTP basic authentication to the master // endpoint. Because the master endpoint is open to the Internet, you should @@ -4175,9 +4173,9 @@ type NodeNetworkConfig struct { // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed // after the node pool has been created. PodIpv4CidrBlock string `json:"podIpv4CidrBlock,omitempty"` - // PodIpv4RangeUtilization: Output only. [Output only] The utilization of the - // IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the - // secondary range], Usage=numNodes*numZones*podIPsPerNode. + // PodIpv4RangeUtilization: Output only. The utilization of the IPv4 range for + // the pod. The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. PodIpv4RangeUtilization float64 `json:"podIpv4RangeUtilization,omitempty"` // PodRange: The ID of the secondary range for pod IPs. If `create_pod_range` // is true, this ID is used for the new range. If `create_pod_range` is false, @@ -4242,7 +4240,7 @@ type NodePool struct { // is sufficient for this number of instances. You must also have available // firewall and routes quota. InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: [Output only] The resource URLs of the managed instance + // InstanceGroupUrls: Output only. The resource URLs of the managed instance // groups // (https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) // associated with this node pool. During the node pool blue-green upgrade @@ -4268,14 +4266,14 @@ type NodePool struct { NetworkConfig *NodeNetworkConfig `json:"networkConfig,omitempty"` // PlacementPolicy: Specifies the node placement policy. PlacementPolicy *PlacementPolicy `json:"placementPolicy,omitempty"` - // PodIpv4CidrSize: [Output only] The pod CIDR block size per node in this node + // PodIpv4CidrSize: Output only. The pod CIDR block size per node in this node // pool. PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` // QueuedProvisioning: Specifies the configuration of queued provisioning. QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. + // SelfLink: Output only. Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: [Output only] The status of the nodes in this pool instance. + // Status: Output only. The status of the nodes in this pool instance. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -4294,12 +4292,12 @@ type NodePool struct { // "ERROR" - The ERROR state indicates the node pool may be unusable. Details // can be found in the `statusMessage` field. Status string `json:"status,omitempty"` - // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional + // StatusMessage: Output only. Deprecated. Use conditions instead. Additional // information about the current status of this node pool instance, if // available. StatusMessage string `json:"statusMessage,omitempty"` - // UpdateInfo: Output only. [Output only] Update info contains relevant - // information during a node pool update. + // UpdateInfo: Output only. Update info contains relevant information during a + // node pool update. UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` // UpgradeSettings: Upgrade settings control disruption and speed of the // upgrade. @@ -4546,25 +4544,25 @@ type Operation struct { // ClusterConditions: Which conditions caused the current cluster state. // Deprecated. Use field error instead. ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` - // Detail: Detailed operation progress, if available. + // Detail: Output only. Detailed operation progress, if available. Detail string `json:"detail,omitempty"` - // EndTime: [Output only] The time the operation completed, in RFC3339 + // EndTime: Output only. The time the operation completed, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. EndTime string `json:"endTime,omitempty"` // Error: The error result of the operation in case of failure. Error *Status `json:"error,omitempty"` - // Location: [Output only] The name of the Google Compute Engine zone + // Location: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // or region // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // in which the cluster resides. Location string `json:"location,omitempty"` - // Name: The server-assigned ID for the operation. + // Name: Output only. The server-assigned ID for the operation. Name string `json:"name,omitempty"` // NodepoolConditions: Which conditions caused the current node pool state. // Deprecated. Use field error instead. NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` - // OperationType: The operation type. + // OperationType: Output only. The operation type. // // Possible values: // "TYPE_UNSPECIFIED" - Not set. @@ -4645,16 +4643,16 @@ type Operation struct { // upgraded. The cluster should be assumed to be blocked for other upgrades // until the operation finishes. OperationType string `json:"operationType,omitempty"` - // Progress: Output only. [Output only] Progress information for an operation. + // Progress: Output only. Progress information for an operation. Progress *OperationProgress `json:"progress,omitempty"` - // SelfLink: Server-defined URI for the operation. Example: + // SelfLink: Output only. Server-defined URI for the operation. Example: // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1 // /operations/operation-123`. SelfLink string `json:"selfLink,omitempty"` - // StartTime: [Output only] The time the operation started, in RFC3339 + // StartTime: Output only. The time the operation started, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. StartTime string `json:"startTime,omitempty"` - // Status: The current status of the operation. + // Status: Output only. The current status of the operation. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -4666,10 +4664,10 @@ type Operation struct { // StatusMessage: Output only. If an error has occurred, a textual description // of the error. Deprecated. Use the field error instead. StatusMessage string `json:"statusMessage,omitempty"` - // TargetLink: Server-defined URI for the target of the operation. The format - // of this is a URI to the resource being modified (such as a cluster, node - // pool, or node). For node pool repairs, there may be multiple nodes being - // repaired, but only one will be the target. Examples: - ## + // TargetLink: Output only. Server-defined URI for the target of the operation. + // The format of this is a URI to the resource being modified (such as a + // cluster, node pool, or node). For node pool repairs, there may be multiple + // nodes being repaired, but only one will be the target. Examples: - ## // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clust // ers/my-cluster` ## // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster @@ -4677,7 +4675,7 @@ type Operation struct { // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster // s/my-cluster/nodePools/my-np/node/my-node` TargetLink string `json:"targetLink,omitempty"` - // Zone: The name of the Google Compute Engine zone + // Zone: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/zones#available) in which the // operation is taking place. This field is deprecated, use location instead. Zone string `json:"zone,omitempty"` @@ -5009,9 +5007,9 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { - // RangeName: Output only. [Output only] Name of a range. + // RangeName: Output only. Name of a range. RangeName string `json:"rangeName,omitempty"` - // Utilization: Output only. [Output only] The utilization of the range. + // Utilization: Output only. The utilization of the range. Utilization float64 `json:"utilization,omitempty"` // ForceSendFields is a list of field names (e.g. "RangeName") to // unconditionally include in API requests. By default, fields with empty or @@ -5177,6 +5175,9 @@ type ReleaseChannel struct { // take advantage of new features. // "STABLE" - Clusters subscribed to STABLE receive versions that are known // to be stable and reliable in production. + // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and + // availability for versions which are known to be stable and reliable in + // production. Channel string `json:"channel,omitempty"` // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -5212,6 +5213,9 @@ type ReleaseChannelConfig struct { // take advantage of new features. // "STABLE" - Clusters subscribed to STABLE receive versions that are known // to be stable and reliable in production. + // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and + // availability for versions which are known to be stable and reliable in + // production. Channel string `json:"channel,omitempty"` // DefaultVersion: The default version for newly created clusters on the // channel. diff --git a/container/v1beta1/container-api.json b/container/v1beta1/container-api.json index a1395fbf115..06189b487ee 100644 --- a/container/v1beta1/container-api.json +++ b/container/v1beta1/container-api.json @@ -2565,7 +2565,7 @@ } } }, - "revision": "20240619", + "revision": "20240708", "rootUrl": "https://container.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -2641,7 +2641,7 @@ "id": "AdditionalPodRangesConfig", "properties": { "podRangeInfo": { - "description": "Output only. [Output only] Information for additional pod range.", + "description": "Output only. Information for additional pod range.", "items": { "$ref": "RangeInfo" }, @@ -2795,11 +2795,13 @@ "id": "AutoUpgradeOptions", "properties": { "autoUpgradeStartTime": { - "description": "[Output only] This field is set when upgrades are about to commence with the approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. This field is set when upgrades are about to commence with the approximate start time for the upgrades, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "description": { - "description": "[Output only] This field is set when upgrades are about to commence with the description of the upgrade.", + "description": "Output only. This field is set when upgrades are about to commence with the description of the upgrade.", + "readOnly": true, "type": "string" } }, @@ -3274,22 +3276,26 @@ "description": "Configuration for the fine-grained cost management feature." }, "createTime": { - "description": "[Output only] The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the cluster was created, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", + "description": "Output only. The current software version of the master endpoint.", + "readOnly": true, "type": "string" }, "currentNodeCount": { "deprecated": true, - "description": "[Output only] The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information.", + "description": "Output only. The number of nodes currently in the cluster. Deprecated. Call Kubernetes API directly to retrieve node information.", "format": "int32", + "readOnly": true, "type": "integer" }, "currentNodeVersion": { "deprecated": true, - "description": "[Output only] Deprecated, use [NodePool.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes.", + "description": "Output only. Deprecated, use [NodePool.version](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) instead. The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes.", + "readOnly": true, "type": "string" }, "databaseEncryption": { @@ -3317,7 +3323,8 @@ "type": "boolean" }, "endpoint": { - "description": "[Output only] The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.", + "description": "Output only. The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at `https://username:password@endpoint/`. See the `masterAuth` property of this resource for username and password information.", + "readOnly": true, "type": "string" }, "enterpriseConfig": { @@ -3329,7 +3336,8 @@ "type": "string" }, "expireTime": { - "description": "[Output only] The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the cluster will be automatically deleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "fleet": { @@ -3357,10 +3365,11 @@ }, "instanceGroupUrls": { "deprecated": true, - "description": "Deprecated. Use node_pools.instance_group_urls.", + "description": "Output only. Deprecated. Use node_pools.instance_group_urls.", "items": { "type": "string" }, + "readOnly": true, "type": "array" }, "ipAllocationPolicy": { @@ -3376,7 +3385,8 @@ "description": "Configuration for the legacy ABAC authorization mode." }, "location": { - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "readOnly": true, "type": "string" }, "locations": { @@ -3449,8 +3459,9 @@ "description": "Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a \"node_pool\" object, since this configuration (along with the \"initial_node_count\") will be used to create a \"NodePool\" object with an auto-generated name. Do not use this and a node_pool at the same time. For responses, this field will be populated with the node configuration of the first node pool. (For configuration of each node pool, see `node_pool.config`) If unspecified, the defaults are used. This field is deprecated, use node_pool.config instead." }, "nodeIpv4CidrSize": { - "description": "[Output only] The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode.", + "description": "Output only. The size of the address space on each node for hosting containers. This is provisioned from within the `container_ipv4_cidr` range. This field will only be set when cluster is in route-based network mode.", "format": "int32", + "readOnly": true, "type": "integer" }, "nodePoolAutoConfig": { @@ -3528,11 +3539,13 @@ "description": "Enable/Disable Security Posture API features for the cluster." }, "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", + "description": "Output only. Server-defined URL for the resource.", + "readOnly": true, "type": "string" }, "servicesIpv4Cidr": { - "description": "[Output only] The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR.", + "description": "Output only. The IP address range of the Kubernetes services in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`). Service addresses are typically put in the last `/16` from the container CIDR.", + "readOnly": true, "type": "string" }, "shieldedNodes": { @@ -3540,7 +3553,7 @@ "description": "Shielded Nodes configuration." }, "status": { - "description": "[Output only] The current status of this cluster.", + "description": "Output only. The current status of this cluster.", "enum": [ "STATUS_UNSPECIFIED", "PROVISIONING", @@ -3559,11 +3572,13 @@ "The ERROR state indicates the cluster may be unusable. Details can be found in the `statusMessage` field.", "The DEGRADED state indicates the cluster requires user action to restore full functionality. Details can be found in the `statusMessage` field." ], + "readOnly": true, "type": "string" }, "statusMessage": { "deprecated": true, - "description": "[Output only] Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available.", + "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this cluster, if available.", + "readOnly": true, "type": "string" }, "subnetwork": { @@ -3575,7 +3590,8 @@ "description": "Configuration for Cloud TPU support;" }, "tpuIpv4CidrBlock": { - "description": "[Output only] The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`).", + "description": "Output only. The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. `1.2.3.4/29`).", + "readOnly": true, "type": "string" }, "verticalPodAutoscaling": { @@ -3596,7 +3612,8 @@ }, "zone": { "deprecated": true, - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field is deprecated, use location instead.", + "readOnly": true, "type": "string" } }, @@ -4240,7 +4257,8 @@ "id": "DailyMaintenanceWindow", "properties": { "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.", + "description": "Output only. Duration of the time window, automatically chosen to be smallest possible in the given scenario.", + "readOnly": true, "type": "string" }, "startTime": { @@ -4369,7 +4387,7 @@ "id": "EnterpriseConfig", "properties": { "clusterTier": { - "description": "Output only. [Output only] cluster_tier specifies the premium tier of the cluster.", + "description": "Output only. cluster_tier specifies the premium tier of the cluster.", "enum": [ "CLUSTER_TIER_UNSPECIFIED", "STANDARD", @@ -4452,11 +4470,13 @@ "id": "Fleet", "properties": { "membership": { - "description": "[Output only] The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.", + "description": "Output only. The full resource name of the registered fleet membership of the cluster, in the format `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`.", + "readOnly": true, "type": "string" }, "preRegistered": { - "description": "[Output only] Whether the cluster has been registered through the fleet API.", + "description": "Output only. Whether the cluster has been registered through the fleet API.", + "readOnly": true, "type": "boolean" }, "project": { @@ -4783,7 +4803,7 @@ "properties": { "additionalPodRangesConfig": { "$ref": "AdditionalPodRangesConfig", - "description": "Output only. [Output only] The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.", + "description": "Output only. The additional pod ranges that are added to the cluster. These pod ranges can be used by new node pools to allocate pod IPs automatically. Once the range is removed it will not show up in IPAllocationPolicy.", "readOnly": true }, "allowRouteOverlap": { @@ -4808,7 +4828,7 @@ "type": "boolean" }, "defaultPodIpv4RangeUtilization": { - "description": "Output only. [Output only] The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", + "description": "Output only. The utilization of the cluster default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", "format": "double", "readOnly": true, "type": "number" @@ -4850,7 +4870,7 @@ "type": "string" }, "servicesIpv6CidrBlock": { - "description": "Output only. [Output only] The services IPv6 CIDR block for the cluster.", + "description": "Output only. The services IPv6 CIDR block for the cluster.", "readOnly": true, "type": "string" }, @@ -4873,7 +4893,7 @@ "type": "string" }, "subnetIpv6CidrBlock": { - "description": "Output only. [Output only] The subnet's IPv6 CIDR block used by nodes and pods.", + "description": "Output only. The subnet's IPv6 CIDR block used by nodes and pods.", "readOnly": true, "type": "string" }, @@ -5341,7 +5361,8 @@ "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.", + "readOnly": true, "type": "string" }, "clientCertificateConfig": { @@ -5349,10 +5370,13 @@ "description": "Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued." }, "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate to the cluster endpoint.", + "description": "Output only. Base64-encoded private key used by clients to authenticate to the cluster endpoint.", + "readOnly": true, "type": "string" }, "clusterCaCertificate": { + "description": "Output only. Base64-encoded public certificate that is the root of trust for the cluster.", + "readOnly": true, "type": "string" }, "password": { @@ -5588,6 +5612,7 @@ }, "network": { "description": "Output only. The relative name of the Google Compute Engine network(https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the cluster is connected. Example: projects/my-project/global/networks/my-network", + "readOnly": true, "type": "string" }, "networkPerformanceConfig": { @@ -5616,6 +5641,7 @@ }, "subnetwork": { "description": "Output only. The relative name of the Google Compute Engine [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet", + "readOnly": true, "type": "string" } }, @@ -6056,7 +6082,7 @@ "type": "string" }, "podIpv4RangeUtilization": { - "description": "Output only. [Output only] The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", + "description": "Output only. The utilization of the IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the secondary range], Usage=numNodes*numZones*podIPsPerNode.", "format": "double", "readOnly": true, "type": "number" @@ -6101,10 +6127,11 @@ "type": "integer" }, "instanceGroupUrls": { - "description": "[Output only] The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", + "description": "Output only. The resource URLs of the [managed instance groups](https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) associated with this node pool. During the node pool blue-green upgrade operation, the URLs contain both blue and green resources.", "items": { "type": "string" }, + "readOnly": true, "type": "array" }, "locations": { @@ -6135,8 +6162,9 @@ "description": "Specifies the node placement policy." }, "podIpv4CidrSize": { - "description": "[Output only] The pod CIDR block size per node in this node pool.", + "description": "Output only. The pod CIDR block size per node in this node pool.", "format": "int32", + "readOnly": true, "type": "integer" }, "queuedProvisioning": { @@ -6144,11 +6172,12 @@ "description": "Specifies the configuration of queued provisioning." }, "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", + "description": "Output only. Server-defined URL for the resource.", + "readOnly": true, "type": "string" }, "status": { - "description": "[Output only] The status of the nodes in this pool instance.", + "description": "Output only. The status of the nodes in this pool instance.", "enum": [ "STATUS_UNSPECIFIED", "PROVISIONING", @@ -6167,16 +6196,18 @@ "The STOPPING state indicates the node pool is being deleted.", "The ERROR state indicates the node pool may be unusable. Details can be found in the `statusMessage` field." ], + "readOnly": true, "type": "string" }, "statusMessage": { "deprecated": true, - "description": "[Output only] Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", + "description": "Output only. Deprecated. Use conditions instead. Additional information about the current status of this node pool instance, if available.", + "readOnly": true, "type": "string" }, "updateInfo": { "$ref": "UpdateInfo", - "description": "Output only. [Output only] Update info contains relevant information during a node pool update.", + "description": "Output only. Update info contains relevant information during a node pool update.", "readOnly": true }, "upgradeSettings": { @@ -6349,11 +6380,13 @@ "type": "array" }, "detail": { - "description": "Detailed operation progress, if available.", + "description": "Output only. Detailed operation progress, if available.", + "readOnly": true, "type": "string" }, "endTime": { - "description": "[Output only] The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "error": { @@ -6361,11 +6394,13 @@ "description": "The error result of the operation in case of failure." }, "location": { - "description": "[Output only] The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides.", + "readOnly": true, "type": "string" }, "name": { - "description": "The server-assigned ID for the operation.", + "description": "Output only. The server-assigned ID for the operation.", + "readOnly": true, "type": "string" }, "nodepoolConditions": { @@ -6377,7 +6412,7 @@ "type": "array" }, "operationType": { - "description": "The operation type.", + "description": "Output only. The operation type.", "enum": [ "TYPE_UNSPECIFIED", "CREATE_CLUSTER", @@ -6441,23 +6476,26 @@ "The control plane is being resized. This operation type is initiated by GKE. These operations are often performed preemptively to ensure that the control plane has sufficient resources and is not typically an indication of issues. For more details, see [documentation on resizes](https://cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions#repairs).", "Fleet features of GKE Enterprise are being upgraded. The cluster should be assumed to be blocked for other upgrades until the operation finishes." ], + "readOnly": true, "type": "string" }, "progress": { "$ref": "OperationProgress", - "description": "Output only. [Output only] Progress information for an operation.", + "description": "Output only. Progress information for an operation.", "readOnly": true }, "selfLink": { - "description": "Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.", + "description": "Output only. Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.", + "readOnly": true, "type": "string" }, "startTime": { - "description": "[Output only] The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "description": "Output only. The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "readOnly": true, "type": "string" }, "status": { - "description": "The current status of the operation.", + "description": "Output only. The current status of the operation.", "enum": [ "STATUS_UNSPECIFIED", "PENDING", @@ -6472,6 +6510,7 @@ "The operation is done, either cancelled or completed.", "The operation is aborting." ], + "readOnly": true, "type": "string" }, "statusMessage": { @@ -6481,12 +6520,14 @@ "type": "string" }, "targetLink": { - "description": "Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "description": "Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`", + "readOnly": true, "type": "string" }, "zone": { "deprecated": true, - "description": "The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.", + "description": "Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead.", + "readOnly": true, "type": "string" } }, @@ -6677,10 +6718,12 @@ }, "peeringName": { "description": "Output only. The peering name in the customer VPC used by this cluster.", + "readOnly": true, "type": "string" }, "privateEndpoint": { "description": "Output only. The internal IP address of this cluster's master endpoint.", + "readOnly": true, "type": "string" }, "privateEndpointSubnetwork": { @@ -6689,6 +6732,7 @@ }, "publicEndpoint": { "description": "Output only. The external IP address of this cluster's master endpoint.", + "readOnly": true, "type": "string" } }, @@ -6783,12 +6827,12 @@ "id": "RangeInfo", "properties": { "rangeName": { - "description": "Output only. [Output only] Name of a range.", + "description": "Output only. Name of a range.", "readOnly": true, "type": "string" }, "utilization": { - "description": "Output only. [Output only] The utilization of the range.", + "description": "Output only. The utilization of the range.", "format": "double", "readOnly": true, "type": "number" @@ -6862,13 +6906,15 @@ "UNSPECIFIED", "RAPID", "REGULAR", - "STABLE" + "STABLE", + "EXTENDED" ], "enumDescriptions": [ "No channel specified.", "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production." + "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", + "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." ], "type": "string" } @@ -6893,13 +6939,15 @@ "UNSPECIFIED", "RAPID", "REGULAR", - "STABLE" + "STABLE", + "EXTENDED" ], "enumDescriptions": [ "No channel specified.", "RAPID channel is offered on an early access basis for customers who want to test new releases. WARNING: Versions available in the RAPID Channel may be subject to unresolved issues with no known workaround and are not subject to any SLAs.", "Clusters subscribed to REGULAR receive versions that are considered GA quality. REGULAR is intended for production users who want to take advantage of new features.", - "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production." + "Clusters subscribed to STABLE receive versions that are known to be stable and reliable in production.", + "Clusters subscribed to EXTENDED receive extended support and availability for versions which are known to be stable and reliable in production." ], "type": "string" }, diff --git a/container/v1beta1/container-gen.go b/container/v1beta1/container-gen.go index 14b0414dd60..2998ec40b8c 100644 --- a/container/v1beta1/container-gen.go +++ b/container/v1beta1/container-gen.go @@ -392,8 +392,7 @@ func (s AdditionalPodNetworkConfig) MarshalJSON() ([]byte, error) { // AdditionalPodRangesConfig: AdditionalPodRangesConfig is the configuration // for additional pod secondary ranges supporting the ClusterUpdate message. type AdditionalPodRangesConfig struct { - // PodRangeInfo: Output only. [Output only] Information for additional pod - // range. + // PodRangeInfo: Output only. Information for additional pod range. PodRangeInfo []*RangeInfo `json:"podRangeInfo,omitempty"` // PodRangeNames: Name for pod secondary ipv4 range which has the actual range // defined ahead. @@ -576,11 +575,11 @@ func (s AuthenticatorGroupsConfig) MarshalJSON() ([]byte, error) { // AutoUpgradeOptions: AutoUpgradeOptions defines the set of options for the // user to control how the Auto Upgrades will proceed. type AutoUpgradeOptions struct { - // AutoUpgradeStartTime: [Output only] This field is set when upgrades are - // about to commence with the approximate start time for the upgrades, in - // RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. + // AutoUpgradeStartTime: Output only. This field is set when upgrades are about + // to commence with the approximate start time for the upgrades, in RFC3339 + // (https://www.ietf.org/rfc/rfc3339.txt) text format. AutoUpgradeStartTime string `json:"autoUpgradeStartTime,omitempty"` - // Description: [Output only] This field is set when upgrades are about to + // Description: Output only. This field is set when upgrades are about to // commence with the description of the upgrade. Description string `json:"description,omitempty"` // ForceSendFields is a list of field names (e.g. "AutoUpgradeStartTime") to @@ -1179,17 +1178,16 @@ type Cluster struct { // CostManagementConfig: Configuration for the fine-grained cost management // feature. CostManagementConfig *CostManagementConfig `json:"costManagementConfig,omitempty"` - // CreateTime: [Output only] The time the cluster was created, in RFC3339 + // CreateTime: Output only. The time the cluster was created, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. CreateTime string `json:"createTime,omitempty"` - // CurrentMasterVersion: [Output only] The current software version of the + // CurrentMasterVersion: Output only. The current software version of the // master endpoint. CurrentMasterVersion string `json:"currentMasterVersion,omitempty"` - // CurrentNodeCount: [Output only] The number of nodes currently in the - // cluster. Deprecated. Call Kubernetes API directly to retrieve node - // information. + // CurrentNodeCount: Output only. The number of nodes currently in the cluster. + // Deprecated. Call Kubernetes API directly to retrieve node information. CurrentNodeCount int64 `json:"currentNodeCount,omitempty"` - // CurrentNodeVersion: [Output only] Deprecated, use NodePool.version + // CurrentNodeVersion: Output only. Deprecated, use NodePool.version // (https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools) // instead. The current version of the node software components. If they are // currently at multiple versions because they're in the process of being @@ -1215,8 +1213,8 @@ type Cluster struct { // EnableTpu: Enable the ability to use Cloud TPUs in this cluster. This field // is deprecated, use tpu_config.enabled instead. EnableTpu bool `json:"enableTpu,omitempty"` - // Endpoint: [Output only] The IP address of this cluster's master endpoint. - // The endpoint can be accessed from the internet at + // Endpoint: Output only. The IP address of this cluster's master endpoint. The + // endpoint can be accessed from the internet at // `https://username:password@endpoint/`. See the `masterAuth` property of this // resource for username and password information. Endpoint string `json:"endpoint,omitempty"` @@ -1226,7 +1224,7 @@ type Cluster struct { // fields, and may be sent on update requests to ensure the client has an // up-to-date value before proceeding. Etag string `json:"etag,omitempty"` - // ExpireTime: [Output only] The time the cluster will be automatically deleted + // ExpireTime: Output only. The time the cluster will be automatically deleted // in RFC3339 (https://www.ietf.org/rfc/rfc3339.txt) text format. ExpireTime string `json:"expireTime,omitempty"` // Fleet: Fleet information for the cluster. @@ -1256,7 +1254,8 @@ type Cluster struct { // a node_pool at the same time. This field is deprecated, use // node_pool.initial_node_count instead. InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: Deprecated. Use node_pools.instance_group_urls. + // InstanceGroupUrls: Output only. Deprecated. Use + // node_pools.instance_group_urls. InstanceGroupUrls []string `json:"instanceGroupUrls,omitempty"` // IpAllocationPolicy: Configuration for cluster IP allocation. IpAllocationPolicy *IPAllocationPolicy `json:"ipAllocationPolicy,omitempty"` @@ -1264,7 +1263,7 @@ type Cluster struct { LabelFingerprint string `json:"labelFingerprint,omitempty"` // LegacyAbac: Configuration for the legacy ABAC authorization mode. LegacyAbac *LegacyAbac `json:"legacyAbac,omitempty"` - // Location: [Output only] The name of the Google Compute Engine zone + // Location: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // or region // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) @@ -1344,7 +1343,7 @@ type Cluster struct { // node pool, see `node_pool.config`) If unspecified, the defaults are used. // This field is deprecated, use node_pool.config instead. NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` - // NodeIpv4CidrSize: [Output only] The size of the address space on each node + // NodeIpv4CidrSize: Output only. The size of the address space on each node // for hosting containers. This is provisioned from within the // `container_ipv4_cidr` range. This field will only be set when cluster is in // route-based network mode. @@ -1399,9 +1398,9 @@ type Cluster struct { // SecurityPostureConfig: Enable/Disable Security Posture API features for the // cluster. SecurityPostureConfig *SecurityPostureConfig `json:"securityPostureConfig,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. + // SelfLink: Output only. Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // ServicesIpv4Cidr: [Output only] The IP address range of the Kubernetes + // ServicesIpv4Cidr: Output only. The IP address range of the Kubernetes // services in this cluster, in CIDR // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. // `1.2.3.4/29`). Service addresses are typically put in the last `/16` from @@ -1409,7 +1408,7 @@ type Cluster struct { ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` // ShieldedNodes: Shielded Nodes configuration. ShieldedNodes *ShieldedNodes `json:"shieldedNodes,omitempty"` - // Status: [Output only] The current status of this cluster. + // Status: Output only. The current status of this cluster. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -1427,7 +1426,7 @@ type Cluster struct { // to restore full functionality. Details can be found in the `statusMessage` // field. Status string `json:"status,omitempty"` - // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional + // StatusMessage: Output only. Deprecated. Use conditions instead. Additional // information about the current status of this cluster, if available. StatusMessage string `json:"statusMessage,omitempty"` // Subnetwork: The name of the Google Compute Engine subnetwork @@ -1436,7 +1435,7 @@ type Cluster struct { Subnetwork string `json:"subnetwork,omitempty"` // TpuConfig: Configuration for Cloud TPU support; TpuConfig *TpuConfig `json:"tpuConfig,omitempty"` - // TpuIpv4CidrBlock: [Output only] The IP address range of the Cloud TPUs in + // TpuIpv4CidrBlock: Output only. The IP address range of the Cloud TPUs in // this cluster, in CIDR // (http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) notation (e.g. // `1.2.3.4/29`). @@ -1453,7 +1452,7 @@ type Cluster struct { // WorkloadIdentityConfig: Configuration for the use of Kubernetes Service // Accounts in GCP IAM policies. WorkloadIdentityConfig *WorkloadIdentityConfig `json:"workloadIdentityConfig,omitempty"` - // Zone: [Output only] The name of the Google Compute Engine zone + // Zone: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/zones#available) in which the cluster // resides. This field is deprecated, use location instead. Zone string `json:"zone,omitempty"` @@ -2177,7 +2176,7 @@ func (s DNSConfig) MarshalJSON() ([]byte, error) { // DailyMaintenanceWindow: Time window specified for daily maintenance // operations. type DailyMaintenanceWindow struct { - // Duration: [Output only] Duration of the time window, automatically chosen to + // Duration: Output only. Duration of the time window, automatically chosen to // be smallest possible in the given scenario. Duration string `json:"duration,omitempty"` // StartTime: Time within the maintenance window to start the maintenance @@ -2351,8 +2350,8 @@ type Empty struct { // EnterpriseConfig: EnterpriseConfig is the cluster enterprise configuration. type EnterpriseConfig struct { - // ClusterTier: Output only. [Output only] cluster_tier specifies the premium - // tier of the cluster. + // ClusterTier: Output only. cluster_tier specifies the premium tier of the + // cluster. // // Possible values: // "CLUSTER_TIER_UNSPECIFIED" - CLUSTER_TIER_UNSPECIFIED is when cluster_tier @@ -2505,11 +2504,11 @@ func (s Filter) MarshalJSON() ([]byte, error) { // Fleet: Fleet is the fleet configuration for the cluster. type Fleet struct { - // Membership: [Output only] The full resource name of the registered fleet + // Membership: Output only. The full resource name of the registered fleet // membership of the cluster, in the format // `//gkehub.googleapis.com/projects/*/locations/*/memberships/*`. Membership string `json:"membership,omitempty"` - // PreRegistered: [Output only] Whether the cluster has been registered through + // PreRegistered: Output only. Whether the cluster has been registered through // the fleet API. PreRegistered bool `json:"preRegistered,omitempty"` // Project: The Fleet host project(project ID or project number) where this @@ -3009,10 +3008,10 @@ func (s ILBSubsettingConfig) MarshalJSON() ([]byte, error) { // IPAllocationPolicy: Configuration for controlling how IPs are allocated in // the cluster. type IPAllocationPolicy struct { - // AdditionalPodRangesConfig: Output only. [Output only] The additional pod - // ranges that are added to the cluster. These pod ranges can be used by new - // node pools to allocate pod IPs automatically. Once the range is removed it - // will not show up in IPAllocationPolicy. + // AdditionalPodRangesConfig: Output only. The additional pod ranges that are + // added to the cluster. These pod ranges can be used by new node pools to + // allocate pod IPs automatically. Once the range is removed it will not show + // up in IPAllocationPolicy. AdditionalPodRangesConfig *AdditionalPodRangesConfig `json:"additionalPodRangesConfig,omitempty"` // AllowRouteOverlap: If true, allow allocation of cluster CIDR ranges that // overlap with certain kinds of network routes. By default we do not allow @@ -3045,10 +3044,9 @@ type IPAllocationPolicy struct { // CreateSubnetwork: Whether a new subnetwork will be created automatically for // the cluster. This field is only applicable when `use_ip_aliases` is true. CreateSubnetwork bool `json:"createSubnetwork,omitempty"` - // DefaultPodIpv4RangeUtilization: Output only. [Output only] The utilization - // of the cluster default IPv4 range for the pod. The ratio is Usage/[Total - // number of IPs in the secondary range], - // Usage=numNodes*numZones*podIPsPerNode. + // DefaultPodIpv4RangeUtilization: Output only. The utilization of the cluster + // default IPv4 range for the pod. The ratio is Usage/[Total number of IPs in + // the secondary range], Usage=numNodes*numZones*podIPsPerNode. DefaultPodIpv4RangeUtilization float64 `json:"defaultPodIpv4RangeUtilization,omitempty"` // Ipv6AccessType: The ipv6 access type (internal or external) when // create_subnetwork is true @@ -3089,8 +3087,8 @@ type IPAllocationPolicy struct { // `10.96.0.0/14`) from the RFC-1918 private networks (e.g. `10.0.0.0/8`, // `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range to use. ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty"` - // ServicesIpv6CidrBlock: Output only. [Output only] The services IPv6 CIDR - // block for the cluster. + // ServicesIpv6CidrBlock: Output only. The services IPv6 CIDR block for the + // cluster. ServicesIpv6CidrBlock string `json:"servicesIpv6CidrBlock,omitempty"` // ServicesSecondaryRangeName: The name of the secondary range to be used as // for the services CIDR block. The secondary range will be used for service @@ -3105,8 +3103,8 @@ type IPAllocationPolicy struct { // "IPV4" - The value used if the cluster is a IPV4 only // "IPV4_IPV6" - The value used if the cluster is a dual stack cluster StackType string `json:"stackType,omitempty"` - // SubnetIpv6CidrBlock: Output only. [Output only] The subnet's IPv6 CIDR block - // used by nodes and pods. + // SubnetIpv6CidrBlock: Output only. The subnet's IPv6 CIDR block used by nodes + // and pods. SubnetIpv6CidrBlock string `json:"subnetIpv6CidrBlock,omitempty"` // SubnetworkName: A custom subnetwork name to be used if `create_subnetwork` // is true. If this field is empty, then an automatic name will be chosen for @@ -3833,16 +3831,18 @@ type Master struct { // endpoint. Authentication can be done using HTTP basic auth or using client // certificates. type MasterAuth struct { - // ClientCertificate: [Output only] Base64-encoded public certificate used by + // ClientCertificate: Output only. Base64-encoded public certificate used by // clients to authenticate to the cluster endpoint. ClientCertificate string `json:"clientCertificate,omitempty"` // ClientCertificateConfig: Configuration for client certificate authentication // on the cluster. For clusters before v1.12, if no configuration is specified, // a client certificate is issued. ClientCertificateConfig *ClientCertificateConfig `json:"clientCertificateConfig,omitempty"` - // ClientKey: [Output only] Base64-encoded private key used by clients to + // ClientKey: Output only. Base64-encoded private key used by clients to // authenticate to the cluster endpoint. - ClientKey string `json:"clientKey,omitempty"` + ClientKey string `json:"clientKey,omitempty"` + // ClusterCaCertificate: Output only. Base64-encoded public certificate that is + // the root of trust for the cluster. ClusterCaCertificate string `json:"clusterCaCertificate,omitempty"` // Password: The password to use for HTTP basic authentication to the master // endpoint. Because the master endpoint is open to the Internet, you should @@ -4663,9 +4663,9 @@ type NodeNetworkConfig struct { // `ip_allocation_policy.use_ip_aliases` is true. This field cannot be changed // after the node pool has been created. PodIpv4CidrBlock string `json:"podIpv4CidrBlock,omitempty"` - // PodIpv4RangeUtilization: Output only. [Output only] The utilization of the - // IPv4 range for the pod. The ratio is Usage/[Total number of IPs in the - // secondary range], Usage=numNodes*numZones*podIPsPerNode. + // PodIpv4RangeUtilization: Output only. The utilization of the IPv4 range for + // the pod. The ratio is Usage/[Total number of IPs in the secondary range], + // Usage=numNodes*numZones*podIPsPerNode. PodIpv4RangeUtilization float64 `json:"podIpv4RangeUtilization,omitempty"` // PodRange: The ID of the secondary range for pod IPs. If `create_pod_range` // is true, this ID is used for the new range. If `create_pod_range` is false, @@ -4730,7 +4730,7 @@ type NodePool struct { // is sufficient for this number of instances. You must also have available // firewall and routes quota. InitialNodeCount int64 `json:"initialNodeCount,omitempty"` - // InstanceGroupUrls: [Output only] The resource URLs of the managed instance + // InstanceGroupUrls: Output only. The resource URLs of the managed instance // groups // (https://cloud.google.com/compute/docs/instance-groups/creating-groups-of-managed-instances) // associated with this node pool. During the node pool blue-green upgrade @@ -4756,14 +4756,14 @@ type NodePool struct { NetworkConfig *NodeNetworkConfig `json:"networkConfig,omitempty"` // PlacementPolicy: Specifies the node placement policy. PlacementPolicy *PlacementPolicy `json:"placementPolicy,omitempty"` - // PodIpv4CidrSize: [Output only] The pod CIDR block size per node in this node + // PodIpv4CidrSize: Output only. The pod CIDR block size per node in this node // pool. PodIpv4CidrSize int64 `json:"podIpv4CidrSize,omitempty"` // QueuedProvisioning: Specifies the configuration of queued provisioning. QueuedProvisioning *QueuedProvisioning `json:"queuedProvisioning,omitempty"` - // SelfLink: [Output only] Server-defined URL for the resource. + // SelfLink: Output only. Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: [Output only] The status of the nodes in this pool instance. + // Status: Output only. The status of the nodes in this pool instance. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -4782,12 +4782,12 @@ type NodePool struct { // "ERROR" - The ERROR state indicates the node pool may be unusable. Details // can be found in the `statusMessage` field. Status string `json:"status,omitempty"` - // StatusMessage: [Output only] Deprecated. Use conditions instead. Additional + // StatusMessage: Output only. Deprecated. Use conditions instead. Additional // information about the current status of this node pool instance, if // available. StatusMessage string `json:"statusMessage,omitempty"` - // UpdateInfo: Output only. [Output only] Update info contains relevant - // information during a node pool update. + // UpdateInfo: Output only. Update info contains relevant information during a + // node pool update. UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"` // UpgradeSettings: Upgrade settings control disruption and speed of the // upgrade. @@ -5033,25 +5033,25 @@ type Operation struct { // ClusterConditions: Which conditions caused the current cluster state. // Deprecated. Use field error instead. ClusterConditions []*StatusCondition `json:"clusterConditions,omitempty"` - // Detail: Detailed operation progress, if available. + // Detail: Output only. Detailed operation progress, if available. Detail string `json:"detail,omitempty"` - // EndTime: [Output only] The time the operation completed, in RFC3339 + // EndTime: Output only. The time the operation completed, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. EndTime string `json:"endTime,omitempty"` // Error: The error result of the operation in case of failure. Error *Status `json:"error,omitempty"` - // Location: [Output only] The name of the Google Compute Engine zone + // Location: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // or region // (https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) // in which the cluster resides. Location string `json:"location,omitempty"` - // Name: The server-assigned ID for the operation. + // Name: Output only. The server-assigned ID for the operation. Name string `json:"name,omitempty"` // NodepoolConditions: Which conditions caused the current node pool state. // Deprecated. Use field error instead. NodepoolConditions []*StatusCondition `json:"nodepoolConditions,omitempty"` - // OperationType: The operation type. + // OperationType: Output only. The operation type. // // Possible values: // "TYPE_UNSPECIFIED" - Not set. @@ -5132,16 +5132,16 @@ type Operation struct { // upgraded. The cluster should be assumed to be blocked for other upgrades // until the operation finishes. OperationType string `json:"operationType,omitempty"` - // Progress: Output only. [Output only] Progress information for an operation. + // Progress: Output only. Progress information for an operation. Progress *OperationProgress `json:"progress,omitempty"` - // SelfLink: Server-defined URI for the operation. Example: + // SelfLink: Output only. Server-defined URI for the operation. Example: // `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1 // /operations/operation-123`. SelfLink string `json:"selfLink,omitempty"` - // StartTime: [Output only] The time the operation started, in RFC3339 + // StartTime: Output only. The time the operation started, in RFC3339 // (https://www.ietf.org/rfc/rfc3339.txt) text format. StartTime string `json:"startTime,omitempty"` - // Status: The current status of the operation. + // Status: Output only. The current status of the operation. // // Possible values: // "STATUS_UNSPECIFIED" - Not set. @@ -5153,10 +5153,10 @@ type Operation struct { // StatusMessage: Output only. If an error has occurred, a textual description // of the error. Deprecated. Use field error instead. StatusMessage string `json:"statusMessage,omitempty"` - // TargetLink: Server-defined URI for the target of the operation. The format - // of this is a URI to the resource being modified (such as a cluster, node - // pool, or node). For node pool repairs, there may be multiple nodes being - // repaired, but only one will be the target. Examples: - ## + // TargetLink: Output only. Server-defined URI for the target of the operation. + // The format of this is a URI to the resource being modified (such as a + // cluster, node pool, or node). For node pool repairs, there may be multiple + // nodes being repaired, but only one will be the target. Examples: - ## // `https://container.googleapis.com/v1/projects/123/locations/us-central1/clust // ers/my-cluster` ## // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster @@ -5164,7 +5164,7 @@ type Operation struct { // `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/cluster // s/my-cluster/nodePools/my-np/node/my-node` TargetLink string `json:"targetLink,omitempty"` - // Zone: The name of the Google Compute Engine zone + // Zone: Output only. The name of the Google Compute Engine zone // (https://cloud.google.com/compute/docs/zones#available) in which the // operation is taking place. This field is deprecated, use location instead. Zone string `json:"zone,omitempty"` @@ -5612,9 +5612,9 @@ func (s QueuedProvisioning) MarshalJSON() ([]byte, error) { // RangeInfo: RangeInfo contains the range name and the range utilization by // this cluster. type RangeInfo struct { - // RangeName: Output only. [Output only] Name of a range. + // RangeName: Output only. Name of a range. RangeName string `json:"rangeName,omitempty"` - // Utilization: Output only. [Output only] The utilization of the range. + // Utilization: Output only. The utilization of the range. Utilization float64 `json:"utilization,omitempty"` // ForceSendFields is a list of field names (e.g. "RangeName") to // unconditionally include in API requests. By default, fields with empty or @@ -5780,6 +5780,9 @@ type ReleaseChannel struct { // take advantage of new features. // "STABLE" - Clusters subscribed to STABLE receive versions that are known // to be stable and reliable in production. + // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and + // availability for versions which are known to be stable and reliable in + // production. Channel string `json:"channel,omitempty"` // ForceSendFields is a list of field names (e.g. "Channel") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -5818,6 +5821,9 @@ type ReleaseChannelConfig struct { // take advantage of new features. // "STABLE" - Clusters subscribed to STABLE receive versions that are known // to be stable and reliable in production. + // "EXTENDED" - Clusters subscribed to EXTENDED receive extended support and + // availability for versions which are known to be stable and reliable in + // production. Channel string `json:"channel,omitempty"` // DefaultVersion: The default version for newly created clusters on the // channel. diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index c511d6fd60f..11d108971d6 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -6219,7 +6219,7 @@ } } }, - "revision": "20240611", + "revision": "20240719", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -10806,6 +10806,10 @@ "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." diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 4a24716ccbd..87f0443ea0d 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -6818,6 +6818,11 @@ type LoyaltyProgram struct { CashbackForFutureUse *Price `json:"cashbackForFutureUse,omitempty"` // LoyaltyPoints: Optional. The amount of loyalty points earned on a purchase. LoyaltyPoints int64 `json:"loyaltyPoints,omitempty,string"` + // MemberPriceEffectiveDate: 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. + MemberPriceEffectiveDate string `json:"memberPriceEffectiveDate,omitempty"` // Price: Optional. The price for members of the given tier (instant discount // price). Must be smaller or equal to the regular price. Price *Price `json:"price,omitempty"` diff --git a/css/v1/css-api.json b/css/v1/css-api.json index fae543c5dd8..20fdf7e4d98 100644 --- a/css/v1/css-api.json +++ b/css/v1/css-api.json @@ -472,7 +472,7 @@ } } }, - "revision": "20240614", + "revision": "20240719", "rootUrl": "https://css.googleapis.com/", "schemas": { "Account": { @@ -820,19 +820,19 @@ "type": "object" }, "Certification": { - "description": "The certification for the product.", + "description": "The certification for the product. Use the this attribute to describe certifications, such as energy efficiency ratings, associated with a product.", "id": "Certification", "properties": { "authority": { - "description": "Name of the certification body.", + "description": "The authority or certification body responsible for issuing the certification. At this time, the most common value is \"EC\" or “European_Commission” for energy labels in the EU.", "type": "string" }, "code": { - "description": "A unique code to identify the certification.", + "description": "The code of the certification. For example, for the EPREL certificate with the link https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 the code is 123456. The code is required for European Energy Labels.", "type": "string" }, "name": { - "description": "Name of the certification.", + "description": "The name of the certification. At this time, the most common value is \"EPREL\", which represents energy efficiency certifications in the EU European Registry for Energy Labeling (EPREL) database.", "type": "string" } }, diff --git a/css/v1/css-gen.go b/css/v1/css-gen.go index 7faec863d7a..f0386057370 100644 --- a/css/v1/css-gen.go +++ b/css/v1/css-gen.go @@ -447,13 +447,22 @@ func (s Attributes) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Certification: The certification for the product. +// Certification: The certification for the product. Use the this attribute to +// describe certifications, such as energy efficiency ratings, associated with +// a product. type Certification struct { - // Authority: Name of the certification body. + // Authority: The authority or certification body responsible for issuing the + // certification. At this time, the most common value is "EC" or + // “European_Commission” for energy labels in the EU. Authority string `json:"authority,omitempty"` - // Code: A unique code to identify the certification. + // Code: The code of the certification. For example, for the EPREL certificate + // with the link + // https://eprel.ec.europa.eu/screen/product/dishwashers2019/123456 the code is + // 123456. The code is required for European Energy Labels. Code string `json:"code,omitempty"` - // Name: Name of the certification. + // Name: The name of the certification. At this time, the most common value is + // "EPREL", which represents energy efficiency certifications in the EU + // European Registry for Energy Labeling (EPREL) database. Name string `json:"name,omitempty"` // ForceSendFields is a list of field names (e.g. "Authority") to // unconditionally include in API requests. By default, fields with empty or diff --git a/dialogflow/v2beta1/dialogflow-api.json b/dialogflow/v2beta1/dialogflow-api.json index 0497316ae53..5e269c4b1ad 100644 --- a/dialogflow/v2beta1/dialogflow-api.json +++ b/dialogflow/v2beta1/dialogflow-api.json @@ -8082,7 +8082,7 @@ } } }, - "revision": "20240704", + "revision": "20240716", "rootUrl": "https://dialogflow.googleapis.com/", "schemas": { "GoogleCloudDialogflowCxV3AdvancedSettings": { @@ -15708,7 +15708,7 @@ "id": "GoogleCloudDialogflowV2beta1AudioInput", "properties": { "audio": { - "description": "Required. The natural language speech audio to be processed. A single request can contain up to 1 minute of speech audio data. The transcribed text cannot contain more than 256 bytes for virtual agent interactions.", + "description": "Required. The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes for virtual agent interactions.", "format": "byte", "type": "string" }, diff --git a/dialogflow/v2beta1/dialogflow-gen.go b/dialogflow/v2beta1/dialogflow-gen.go index f54bcc21316..9251f0b3ff0 100644 --- a/dialogflow/v2beta1/dialogflow-gen.go +++ b/dialogflow/v2beta1/dialogflow-gen.go @@ -11515,7 +11515,7 @@ func (s GoogleCloudDialogflowV2beta1AssistQueryParameters) MarshalJSON() ([]byte // speech audio to be processed. type GoogleCloudDialogflowV2beta1AudioInput struct { // Audio: Required. The natural language speech audio to be processed. A single - // request can contain up to 1 minute of speech audio data. The transcribed + // request can contain up to 2 minutes of speech audio data. The transcribed // text cannot contain more than 256 bytes for virtual agent interactions. Audio string `json:"audio,omitempty"` // Config: Required. Instructs the speech recognizer how to process the speech diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 6ea0a7ecf99..333e32d3595 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -5428,6 +5428,80 @@ } } }, + "identity_mapping_stores": { + "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": "v1/projects/{projectsId}/locations/{locationsId}/identity_mapping_stores/{identity_mapping_storesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.identity_mapping_stores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+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": "v1/projects/{projectsId}/locations/{locationsId}/identity_mapping_stores/{identity_mapping_storesId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.identity_mapping_stores.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/[^/]+/identity_mapping_stores/[^/]+$", + "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}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "operations": { "methods": { "get": { @@ -5711,7 +5785,7 @@ } } }, - "revision": "20240704", + "revision": "20240715", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6252,7 +6326,7 @@ "type": "string" }, "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", "enum": [ "SEARCH_RESULT_MODE_UNSPECIFIED", "DOCUMENTS", @@ -6403,7 +6477,7 @@ "properties": { "answer": { "$ref": "GoogleCloudDiscoveryengineV1Answer", - "description": "Answer resource object. If AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." + "description": "Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." }, "answerQueryToken": { "description": "A global unique ID used for logging.", @@ -6667,7 +6741,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", "type": "object" }, "title": { @@ -9753,7 +9827,7 @@ "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", "enum": [ "SEARCH_RESULT_MODE_UNSPECIFIED", "DOCUMENTS", @@ -11263,7 +11337,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", "type": "object" }, "title": { @@ -11582,6 +11656,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { "description": "Metadata for Create Schema LRO.", "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", @@ -11616,6 +11696,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec": { + "description": "Defines custom fine tuning spec.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "properties": { + "enableSearchAdaptor": { + "description": "Whether or not to enable and include custom fine tuned search adaptor model.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCustomTuningModel": { "description": "Metadata that describes a custom tuned model.", "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", @@ -12322,6 +12413,96 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluation", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Evaluation was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true + }, + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "readOnly": true, + "type": "array" + }, + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." + }, + "name": { + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the evaluation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", + "properties": { + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." + }, + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", + "properties": { + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata": { "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata", @@ -12505,6 +12686,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", + "properties": { + "documentDataMap": { + "additionalProperties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + }, + "description": "Document data keyed by URI pattern. For example: document_data_map = { \"www.url1.com/*\": { \"Categories\": [\"category1\", \"category2\"] }, \"www.url2.com/*\": { \"Categories\": [\"category3\"] } }", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaIdpConfig": { "description": "Identity Provider Config.", "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", @@ -12647,6 +12846,56 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata", + "properties": { + "createTime": { + "description": "ImportSampleQueries operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", @@ -12743,6 +12992,33 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaInterval": { + "description": "A floating point interval.", + "id": "GoogleCloudDiscoveryengineV1alphaInterval", + "properties": { + "exclusiveMaximum": { + "description": "Exclusive upper bound.", + "format": "double", + "type": "number" + }, + "exclusiveMinimum": { + "description": "Exclusive lower bound.", + "format": "double", + "type": "number" + }, + "maximum": { + "description": "Inclusive upper bound.", + "format": "double", + "type": "number" + }, + "minimum": { + "description": "Inclusive lower bound.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaLanguageInfo": { "description": "Language info for DataStore.", "id": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", @@ -13049,6 +13325,60 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", + "properties": { + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "properties": { + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" + }, + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" + }, + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" + }, + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaQuery": { "description": "Defines a user inputed query.", "id": "GoogleCloudDiscoveryengineV1alphaQuery", @@ -13203,457 +13533,578 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSession": { - "description": "External session proto definition.", - "id": "GoogleCloudDiscoveryengineV1alphaSession", + "GoogleCloudDiscoveryengineV1alphaSearchRequest": { + "description": "Request message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequest", "properties": { - "endTime": { - "description": "Output only. The time the session finished.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "branch": { + "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", "type": "string" }, - "startTime": { - "description": "Output only. The time the session started.", - "format": "google-datetime", - "readOnly": true, + "canonicalFilter": { + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", "type": "string" }, - "state": { - "description": "The state of the session.", - "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS" + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "A specification for configuring the behavior of content search." + }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs. If set, it has higher priority than the configs set in ServingConfig.custom_fine_tuning_spec." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + }, + "type": "array" + }, + "embeddingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", + "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." + }, + "facetSpecs": { + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec" + }, + "type": "array" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", + "type": "string" + }, + "imageQuery": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", + "description": "Raw image query." + }, + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", + "type": "string" + }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, + "offset": { + "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", + "type": "object" + }, + "query": { + "description": "Raw search query.", + "type": "string" + }, + "queryExpansionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", + "description": "The query expansion specification that specifies the conditions under which query expansion occurs." + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "type": "string" + }, + "regionCode": { + "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": [ - "State is unspecified.", - "The session is currently open." + "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" }, - "turns": { - "description": "Turns.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" + "safeSearch": { + "description": "Whether to turn on safe search. This is only supported for website search.", + "type": "boolean" + }, + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + }, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "type": "string" + }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, + "spellCorrectionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", + "description": "The spell correction specification that specifies the mode under which spell correction takes effect." + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." + }, + "userLabels": { + "additionalProperties": { + "type": "string" }, - "type": "array" + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" }, "userPseudoId": { - "description": "A unique identifier for tracking users.", + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSessionTurn": { - "description": "Represents a turn, including a query from the user and a answer from service.", - "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec": { + "description": "Boost specification to boost certain documents.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", "properties": { - "answer": { - "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", - "type": "string" - }, - "query": { - "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", - "description": "The user query." + "conditionBoostSpecs": { + "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { - "description": "Verification information for target sites in advanced site search.", - "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec": { + "description": "Boost applies to documents which match a condition.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec", "properties": { - "siteVerificationState": { - "description": "Site verification state indicating the ownership and validity.", - "enum": [ - "SITE_VERIFICATION_STATE_UNSPECIFIED", - "VERIFIED", - "UNVERIFIED", - "EXEMPTED" - ], - "enumDescriptions": [ - "Defaults to VERIFIED.", - "Site ownership verified.", - "Site ownership pending verification or verification failed.", - "Site exempt from verification, e.g., a public website that opens to all." - ], - "type": "string" + "boost": { + "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", + "format": "float", + "type": "number" }, - "verifyTime": { - "description": "Latest site verification time.", - "format": "google-datetime", + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, + "condition": { + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSite": { - "description": "A target site for the SiteSearchEngine.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", "properties": { - "exactMatch": { - "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", - "type": "boolean" - }, - "failureReason": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", - "description": "Output only. Failure reason.", - "readOnly": true - }, - "generatedUriPattern": { - "description": "Output only. This is system-generated based on the provided_uri_pattern.", - "readOnly": true, - "type": "string" - }, - "indexingStatus": { - "description": "Output only. Indexing status.", + "attributeType": { + "description": "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": [ - "INDEXING_STATUS_UNSPECIFIED", - "PENDING", - "FAILED", - "SUCCEEDED", - "DELETING" + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" ], "enumDescriptions": [ - "Defaults to SUCCEEDED.", - "The target site is in the update queue and will be picked up by indexing pipeline.", - "The target site fails to be indexed.", - "The target site has been indexed.", - "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." + "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]`. For example, `5D`, `3DT12H30M`, `T24H`." ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", - "readOnly": true, "type": "string" }, - "providedUriPattern": { - "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", - "type": "string" + "controlPoints": { + "description": "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" }, - "rootDomainUri": { - "description": "Output only. Root domain of the provided_uri_pattern.", - "readOnly": true, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", "type": "string" }, - "siteVerificationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", - "description": "Output only. Site ownership and validity verification status.", - "readOnly": true - }, - "type": { - "description": "The type of the target site, e.g., whether the site is to be included or excluded.", + "interpolationType": { + "description": "The interpolation type to be applied to connect the control points listed below.", "enum": [ - "TYPE_UNSPECIFIED", - "INCLUDE", - "EXCLUDE" + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" ], "enumDescriptions": [ - "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", - "Include the target site.", - "Exclude the target site." + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." ], "type": "string" - }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "attributeValue": { + "description": "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": "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" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { - "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { - "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "maxExtractiveAnswerCount": { + "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the data.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "maxExtractiveSegmentCount": { + "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", + "format": "int32", + "type": "integer" }, - "metrics": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "The metrics of the trained model.", - "type": "object" + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" }, - "modelName": { - "description": "Fully qualified name of the CustomTuningModel.", - "type": "string" + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" }, - "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" + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { - "description": "Metadata associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", "properties": { - "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", - "type": "string" + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" + }, + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" + }, + "returnSnippet": { + "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { - "description": "Response associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", + "type": "boolean" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "ignoreNonSummarySeekingQuery": { + "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", + "type": "boolean" + }, + "languageCode": { + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", "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", + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", "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", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec": { + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", + "properties": { + "dataStore": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec": { + "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", "properties": { - "targetSites": { - "description": "TargetSites created.", + "embeddingVectors": { + "description": "The embedding vector used for retrieval. Limit to 1.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCondition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1betaCondition", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector": { + "description": "Embedding vector.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" - }, - "type": "array" + "fieldPath": { + "description": "Embedding field path in schema.", + "type": "string" }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "vector": { + "description": "Query embedding vector.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + "format": "float", + "type": "number" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec": { + "description": "A facet specification to perform faceted search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec", "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", + "enableDynamicPosition": { + "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", "type": "boolean" }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", - "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", - "format": "google-datetime", - "type": "string" + "excludedFilterKeys": { + "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "type": "string" + }, + "type": "array" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", - "format": "google-datetime", - "type": "string" + "facetKey": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", + "description": "Required. The facet key specification." + }, + "limit": { + "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControl": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "id": "GoogleCloudDiscoveryengineV1betaControl", + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey": { + "description": "Specifies how a facet is computed.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", "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.", + "caseInsensitive": { + "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", + "type": "boolean" + }, + "contains": { + "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", "items": { "type": "string" }, - "readOnly": true, "type": "array" }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", - "description": "Defines a boost-type control" - }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "intervals": { + "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + "$ref": "GoogleCloudDiscoveryengineV1alphaInterval" }, "type": "array" }, - "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "key": { + "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", "type": "string" }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" - }, - "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "orderBy": { + "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", "type": "string" }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", - "description": "Defines a redirect-type control." + "prefixes": { + "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" }, - "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "restrictedValues": { + "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery": { + "description": "Specifies the image query input.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", + "properties": { + "imageBytes": { + "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "properties": { + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" ], "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." ], "type": "string" }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." - }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", "items": { - "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], "type": "string" }, "type": "array" @@ -13661,103 +14112,153 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec": { + "description": "Specification to determine under which conditions query expansion should occur.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" - }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "condition": { + "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", + "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", + "Automatic query expansion built by the Search API." + ], "type": "string" }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" + "pinUnexpandedResults": { + "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", "type": "string" + }, + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec": { + "description": "The specification for query spell correction.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", - "items": { - "type": "string" - }, - "type": "array" + "mode": { + "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "SUGGESTION_ONLY", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", + "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", + "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." + ], + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaSession": { + "description": "External session proto definition.", + "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { - "createTime": { - "description": "Operation create time.", + "endTime": { + "description": "Output only. The time the session finished.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "type": "string" + }, + "startTime": { + "description": "Output only. The time the session started.", "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the session.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS" + ], + "enumDescriptions": [ + "State is unspecified.", + "The session is currently open." + ], + "type": "string" + }, + "turns": { + "description": "Turns.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" + }, + "type": "array" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaSessionTurn": { + "description": "Represents a turn, including a query from the user and a answer from service.", + "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "answer": { + "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "The user query." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.SetUriPatternDocumentData operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -13772,178 +14273,145 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.SetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { + "description": "Verification information for target sites in advanced site search.", + "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "siteVerificationState": { + "description": "Site verification state indicating the ownership and validity.", + "enum": [ + "SITE_VERIFICATION_STATE_UNSPECIFIED", + "VERIFIED", + "UNVERIFIED", + "EXEMPTED" + ], + "enumDescriptions": [ + "Defaults to VERIFIED.", + "Site ownership verified.", + "Site ownership pending verification or verification failed.", + "Site exempt from verification, e.g., a public website that opens to all." + ], "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "verifyTime": { + "description": "Latest site verification time.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCustomTuningModel": { - "description": "Metadata that describes a custom tuned model.", - "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", + "GoogleCloudDiscoveryengineV1alphaTargetSite": { + "description": "A target site for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", "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" - ], - "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." - ], - "type": "string" + "exactMatch": { + "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", + "type": "boolean" }, - "modelVersion": { - "description": "The version of the model.", - "format": "int64", - "type": "string" + "failureReason": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "description": "Output only. Failure reason.", + "readOnly": true }, - "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.", + "generatedUriPattern": { + "description": "Output only. This is system-generated based on the provided_uri_pattern.", + "readOnly": true, "type": "string" }, - "trainingStartTime": { - "description": "Timestamp the model training was initiated.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1betaDataStore", - "properties": { - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "indexingStatus": { + "description": "Output only. Indexing status.", "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "INDEXING_STATUS_UNSPECIFIED", + "PENDING", + "FAILED", + "SUCCEEDED", + "DELETING" ], "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." + "Defaults to SUCCEEDED.", + "The target site is in the update queue and will be picked up by indexing pipeline.", + "The target site fails to be indexed.", + "The target site has been indexed.", + "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." ], + "readOnly": true, "type": "string" }, - "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", - "format": "google-datetime", + "name": { + "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", "readOnly": true, "type": "string" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", - "readOnly": true, + "providedUriPattern": { + "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", "type": "string" }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "rootDomainUri": { + "description": "Output only. Root domain of the provided_uri_pattern.", + "readOnly": true, "type": "string" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." + "siteVerificationInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "description": "Output only. Site ownership and validity verification status.", + "readOnly": true }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", + "type": { + "description": "The type of the target site, e.g., whether the site is to be included or excluded.", "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" + "TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" ], "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." + "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", + "Include the target site.", + "Exclude the target site." ], "type": "string" }, - "languageInfo": { - "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", - "description": "Language info for DataStore." - }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "updateTime": { + "description": "Output only. The target site's last updated time.", + "format": "google-datetime", + "readOnly": true, "type": "string" - }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", - "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" - }, - "type": "array" - }, - "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "properties": { + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "properties": { + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -13958,26 +14426,60 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "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" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "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" }, - "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "properties": { + "engine": { + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -13992,9 +14494,9 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -14009,215 +14511,146 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1alphaUserInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "userAgent": { + "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "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", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." - }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" - }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", - "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" - }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1betaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1betaCondition", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." - }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" + }, + "type": "array" }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", "properties": { - "createTime": { - "description": "Operation create time.", + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", "format": "google-datetime", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "startTime": { + "description": "Start of time range. Range is inclusive.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngine", + "GoogleCloudDiscoveryengineV1betaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." - }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true - }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." - }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", + "associatedServingConfigIds": { + "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" + }, "readOnly": true, - "type": "string" + "type": "array" }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaCondition" }, "type": "array" }, "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], - "type": "string" + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", "type": "string" }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "description": "Defines a redirect-type control." }, "solutionType": { - "description": "Required. The solutions of the engine.", + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", "enum": [ "SOLUTION_TYPE_UNSPECIFIED", "SOLUTION_TYPE_RECOMMENDATION", @@ -14234,128 +14667,137 @@ ], "type": "string" }, - "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1betaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1betaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", - "type": "string" - }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", - "type": "string" - }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", - "type": "string" + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", - "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" - }, - "type": "array" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, "updateTime": { @@ -14366,343 +14808,1774 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1betaCustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", "properties": { "createTime": { - "description": "Operation create time.", + "deprecated": true, + "description": "Timestamp the Model was created at.", "format": "google-datetime", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "displayName": { + "description": "The display name of the model.", "type": "string" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", + "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" + ], + "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." + ], "type": "string" }, - "totalCount": { - "description": "Total count of entries that were processed.", + "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1betaDataStore", + "properties": { + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "languageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "description": "Language info for DataStore." + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "type": "array" + }, + "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)." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." + }, + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", + "properties": { + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngine", + "properties": { + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", + "properties": { + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." + }, + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", + "properties": { + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" + }, + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", + "properties": { + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "properties": { + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluation", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Evaluation was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true + }, + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "readOnly": true, + "type": "array" + }, + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." + }, + "name": { + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the evaluation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", + "properties": { + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." + }, + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", + "properties": { + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "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" + }, + "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "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" + }, + "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata", + "properties": { + "createTime": { + "description": "ImportSampleQueries operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", + "type": "string" + }, + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "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" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaInterval": { + "description": "A floating point interval.", + "id": "GoogleCloudDiscoveryengineV1betaInterval", + "properties": { + "exclusiveMaximum": { + "description": "Exclusive upper bound.", + "format": "double", + "type": "number" + }, + "exclusiveMinimum": { + "description": "Exclusive lower bound.", + "format": "double", + "type": "number" + }, + "maximum": { + "description": "Inclusive upper bound.", + "format": "double", + "type": "number" + }, + "minimum": { + "description": "Inclusive lower bound.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaLanguageInfo": { + "description": "Language info for DataStore.", + "id": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "properties": { + "language": { + "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", + "readOnly": true, + "type": "string" + }, + "languageCode": { + "description": "The language code for the DataStore.", + "type": "string" + }, + "normalizedLanguageCode": { + "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse", + "properties": { + "models": { + "description": "List of custom tuning models.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCustomTuningModel" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1betaProject", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" + }, + "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse", + "properties": { + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", + "type": "string" + }, + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "properties": { + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "properties": { + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" + }, + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" + }, + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" + }, + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSchema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1betaSchema", + "properties": { + "jsonSchema": { + "description": "The JSON representation of the schema.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequest": { + "description": "Request message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequest", + "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, + "branch": { + "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", + "type": "string" + }, + "canonicalFilter": { + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", + "type": "string" + }, + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", + "description": "A specification for configuring the behavior of content search." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec" + }, + "type": "array" + }, + "embeddingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec", + "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." + }, + "facetSpecs": { + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec" + }, + "type": "array" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", + "type": "string" + }, + "imageQuery": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery", + "description": "Raw image query." + }, + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", + "type": "string" + }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, + "offset": { + "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", + "type": "object" + }, + "query": { + "description": "Raw search query.", + "type": "string" + }, + "queryExpansionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec", + "description": "The query expansion specification that specifies the conditions under which query expansion occurs." + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "type": "string" + }, + "regionCode": { + "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" + }, + "safeSearch": { + "description": "Whether to turn on safe search. This is only supported for website search.", + "type": "boolean" + }, + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + }, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "type": "string" + }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, + "spellCorrectionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", + "description": "The spell correction specification that specifies the mode under which spell correction takes effect." + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserInfo", + "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec": { + "description": "Boost specification to boost certain documents.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "properties": { + "conditionBoostSpecs": { + "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec": { + "description": "Boost applies to documents which match a condition.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec", + "properties": { + "boost": { + "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", + "format": "float", + "type": "number" + }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, + "condition": { + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "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": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "attributeType": { + "description": "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]`. For example, `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "controlPoints": { + "description": "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": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" }, "type": "array" + }, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "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": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "attributeValue": { + "description": "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": "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" }, - "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", - "type": "string" + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", - "type": "string" + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "maxExtractiveAnswerCount": { + "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "maxExtractiveSegmentCount": { + "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", + "format": "int32", + "type": "integer" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", - "type": "string" + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", - "type": "string" + "returnSnippet": { + "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaLanguageInfo": { - "description": "Language info for DataStore.", - "id": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec", "properties": { - "language": { - "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", - "readOnly": true, - "type": "string" + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreNonSummarySeekingQuery": { + "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", + "type": "boolean" }, "languageCode": { - "description": "The language code for the DataStore.", + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" }, - "normalizedLanguageCode": { - "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", - "readOnly": true, - "type": "string" + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." }, - "region": { - "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", - "readOnly": true, - "type": "string" + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse": { - "description": "Response message for SearchTuningService.ListCustomModels method.", - "id": "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", "properties": { - "models": { - "description": "List of custom tuning models.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaCustomTuningModel" - }, - "type": "array" + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProject": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1betaProject", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", "type": "string" - }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec": { + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", + "properties": { + "dataStore": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" - }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec": { + "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec", + "properties": { + "embeddingVectors": { + "description": "The embedding vector used for retrieval. Limit to 1.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector" }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector": { + "description": "Embedding vector.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", + "fieldPath": { + "description": "Embedding field path in schema.", "type": "string" }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", - "type": "string" + "vector": { + "description": "Query embedding vector.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec": { + "description": "A facet specification to perform faceted search.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec", + "properties": { + "enableDynamicPosition": { + "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", + "type": "boolean" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", - "type": "string" + "excludedFilterKeys": { + "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "type": "string" + }, + "type": "array" }, - "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", - "enum": [ - "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" - ], - "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." - ], - "type": "string" + "facetKey": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey", + "description": "Required. The facet key specification." }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", - "type": "string" + "limit": { + "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey": { + "description": "Specifies how a facet is computed.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "caseInsensitive": { + "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", + "type": "boolean" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "contains": { + "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", + "intervals": { + "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaInterval" + }, + "type": "array" + }, + "key": { + "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", "type": "string" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", + "orderBy": { + "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "prefixes": { + "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" + }, + "restrictedValues": { + "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery": { + "description": "Specifies the image query input.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery", + "properties": { + "imageBytes": { + "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], "type": "string" }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", "items": { "type": "string" }, @@ -14711,61 +16584,85 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec": { + "description": "Specification to determine under which conditions query expansion should occur.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "condition": { + "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", + "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", + "Automatic query expansion built by the Search API." + ], "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "pinUnexpandedResults": { + "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaSchema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1betaSchema", + "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", "properties": { - "jsonSchema": { - "description": "The JSON representation of the schema.", + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec": { + "description": "The specification for query spell correction.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", + "properties": { + "mode": { + "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "SUGGESTION_ONLY", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", + "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", + "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." + ], "type": "string" - }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" } }, "type": "object" @@ -15002,6 +16899,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1betaUserInfo", + "properties": { + "userAgent": { + "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", + "type": "string" + }, + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "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 f63278c164e..4818f2ea58c 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -174,6 +174,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) + rs.IdentityMappingStores = NewProjectsLocationsIdentityMappingStoresService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) rs.UserEvents = NewProjectsLocationsUserEventsService(s) @@ -189,6 +190,8 @@ type ProjectsLocationsService struct { GroundingConfigs *ProjectsLocationsGroundingConfigsService + IdentityMappingStores *ProjectsLocationsIdentityMappingStoresService + Operations *ProjectsLocationsOperationsService RankingConfigs *ProjectsLocationsRankingConfigsService @@ -799,6 +802,27 @@ type ProjectsLocationsGroundingConfigsService struct { s *Service } +func NewProjectsLocationsIdentityMappingStoresService(s *Service) *ProjectsLocationsIdentityMappingStoresService { + rs := &ProjectsLocationsIdentityMappingStoresService{s: s} + rs.Operations = NewProjectsLocationsIdentityMappingStoresOperationsService(s) + return rs +} + +type ProjectsLocationsIdentityMappingStoresService struct { + s *Service + + Operations *ProjectsLocationsIdentityMappingStoresOperationsService +} + +func NewProjectsLocationsIdentityMappingStoresOperationsService(s *Service) *ProjectsLocationsIdentityMappingStoresOperationsService { + rs := &ProjectsLocationsIdentityMappingStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsIdentityMappingStoresOperationsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1574,11 +1598,7 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams struct // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. OrderBy string `json:"orderBy,omitempty"` // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See parse and chunk - // documents + // search result mode defaults to `DOCUMENTS`. See parse and chunk documents // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) // // Possible values: @@ -1792,8 +1812,8 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchResultList // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1AnswerQueryResponse struct { // Answer: Answer resource object. If - // AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use - // Answer.name to fetch answer information using + // AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_ste + // ps is greater than 1, use Answer.name to fetch answer information using // ConversationalSearchService.GetAnswer API. Answer *GoogleCloudDiscoveryengineV1Answer `json:"answer,omitempty"` // AnswerQueryToken: A global unique ID used for logging. @@ -2121,9 +2141,8 @@ type GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResult struct // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1AnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document (code pointer: - // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: - // http://shortn/_Ipo6KFFGBL). + // It's populated from the struct data from the Document , or the Chunk in + // search result . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -6634,10 +6653,7 @@ type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { // there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // search result mode defaults to `DOCUMENTS`. // // Possible values: // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. @@ -8767,9 +8783,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document (code pointer: - // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: - // http://shortn/_Ipo6KFFGBL). + // It's populated from the struct data from the Document , or the Chunk in + // search result . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -9267,6 +9282,11 @@ func (s GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata struct { +} + // GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for Create // Schema LRO. type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { @@ -9320,6 +9340,30 @@ func (s GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec: Defines custom fine +// tuning spec. +type GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec struct { + // EnableSearchAdaptor: Whether or not to enable and include custom fine tuned + // search adaptor model. + EnableSearchAdaptor bool `json:"enableSearchAdaptor,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableSearchAdaptor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableSearchAdaptor") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCustomTuningModel: Metadata that describes // a custom tuned model. type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { @@ -10253,6 +10297,113 @@ func (s GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1alphaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1alphaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,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 GoogleCloudDiscoveryengineV1alphaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata: Metadata related // to the progress of the Export operation. This is returned by the // google.longrunning.Operation.metadata field. @@ -10473,6 +10624,31 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.GetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { + // DocumentDataMap: Document data keyed by URI pattern. For example: + // document_data_map = { "www.url1.com/*": { "Categories": ["category1", + // "category2"] }, "www.url2.com/*": { "Categories": ["category3"] } } + DocumentDataMap map[string]googleapi.RawMessage `json:"documentDataMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocumentDataMap") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentDataMap") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { // ExternalIdpConfig: External Identity provider config. @@ -10672,6 +10848,66 @@ func (s GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of SampleQuerys that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of SampleQuerys successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse: Response of +// the SampleQueryService.ImportSampleQueries method. If the long running +// operation is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata: // Metadata related to the progress of the ImportSuggestionDenyListEntries // operation. This is returned by the google.longrunning.Operation.metadata @@ -10793,6 +11029,54 @@ func (s GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1alphaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} + // GoogleCloudDiscoveryengineV1alphaLanguageInfo: Language info for DataStore. type GoogleCloudDiscoveryengineV1alphaLanguageInfo struct { // Language: Output only. Language part of normalized_language_code. E.g.: @@ -11208,6 +11492,109 @@ func (s GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1alphaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocNdcg") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics: Stores the +// metric values at specific top-k levels. +type GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + // GoogleCloudDiscoveryengineV1alphaQuery: Defines a user inputed query. type GoogleCloudDiscoveryengineV1alphaQuery struct { // QueryId: Unique Id for the query. @@ -11390,732 +11777,1185 @@ func (s GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. -type GoogleCloudDiscoveryengineV1alphaSession struct { - // EndTime: Output only. The time the session finished. - EndTime string `json:"endTime,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/engines/{engine - // }/sessions/*` - Name string `json:"name,omitempty"` - // StartTime: Output only. The time the session started. - StartTime string `json:"startTime,omitempty"` - // State: The state of the session. +// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave + // this field empty, to search documents under the default branch. + Branch string `json:"branch,omitempty"` + // CanonicalFilter: The default filter that is applied when a user performs a + // search without checking any filters on the search page. The filter applied + // to every search request when quality improvement such as query expansion is + // needed. In the case a query does not have a sufficient amount of results + // this filter will be used to determine whether or not to enable the query + // expansion flow. The original filter will still be used for the query + // expanded search. This field is strongly recommended to achieve high search + // quality. For more information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of content + // search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // CustomFineTuningSpec: Custom fine tuning configs. If set, it has higher + // priority than the configs set in ServingConfig.custom_fine_tuning_spec. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it + // will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no facets are + // returned. A maximum of 100 values are allowed. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For + // more information, see Standard fields + // (https://cloud.google.com/apis/design/standard_fields). This field helps to + // better interpret the query. If a value isn't specified, the query language + // code is automatically detected, which may not be accurate. + LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that is, + // starting result location, amongst the Documents deemed by the API as + // relevant) in search results. This field is only considered if page_token is + // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering + // for retail search, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field + // is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of Documents to return. The maximum allowed value + // depends on the data type. Values above the maximum value are coerced to the + // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * + // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: + // Default `50`, Maximum `100`. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to SearchService.Search must match the call that + // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageToken string `json:"pageToken,omitempty"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. If set + // to non-empty, results are restricted or boosted based on the location + // provided. For example, `user_country_code: "au" For available codes see + // Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which enables + // image searching. For example, `search_type: 1` + Params googleapi.RawMessage `json:"params,omitempty"` + // Query: Raw search query. + Query string `json:"query,omitempty"` + // QueryExpansionSpec: The query expansion specification that specifies the + // conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. This overrides ServingConfig.ranking_expression. The + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RegionCode: 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. + 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: - // "STATE_UNSPECIFIED" - State is unspecified. - // "IN_PROGRESS" - The session is currently open. - State string `json:"state,omitempty"` - // Turns: Turns. - Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` - // UserPseudoId: A unique identifier for tracking users. + // "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"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` + // SpellCorrectionSpec: The spell correction specification that specifies the + // mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // UserInfo: Information about the end user. Highly recommended for analytics. + // UserInfo.user_agent is used to deduce `device_type` for analytics. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. This should be the same + // identifier as UserEvent.user_pseudo_id and + // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. UserPseudoId string `json:"userPseudoId,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 + // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSession +func (s GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, including a -// query from the user and a answer from service. -type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { - // Answer: The resource name of the answer to the user query. Only set if the - // answer generation (/answer API call) happened in this turn. - Answer string `json:"answer,omitempty"` - // Query: The user query. - Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost specification +// to boost certain documents. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document matches + // multiple conditions in the specifictions, boost scores from these + // specifications are all applied and combined in a non-linear way. Maximum + // number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec: +// Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a + // big promotion. However, it does not necessarily mean that the boosted + // document will be the top result at all times, nor that other documents will + // be excluded. Results could still be shown even when none of them matches the + // condition. And results that are significantly more relevant to the search + // query can still trump your heavily favored but irrelevant documents. Setting + // to -1.0 gives the document a big demotion. However, results that are deeply + // relevant might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. Setting to + // 0.0 means no boost applied. The boosting condition is ignored. Only one of + // the (condition, boost) combination or the boost_control_spec below are set. + // If both are set then the global boost is ignored and the more fine-grained + // boost_control_spec is applied. + Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` + // Condition: An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * To boost + // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": + // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Answer") to include in API + // NullFields is a list of field names (e.g. "Boost") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the ownership and - // validity. +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoos +// tControlSpec: 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 GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: 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: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website that - // opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to + // "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]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: 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. "SiteVerificationState") 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. "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 GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1alphaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated to - // include all pages whose address contains the provided_uri_pattern. If set to - // true, an uri_pattern is generated to try to be an exact match of the - // provided_uri_pattern or just the specific page if the provided_uri_pattern - // is a specific one. provided_uri_pattern is always normalized to generate the - // URI pattern to be used by the search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` - // GeneratedUriPattern: Output only. This is system-generated based on the - // provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be picked up - // by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to be - // deleted. This is a transitioning state which will resulted in either: 1. - // target site deleted if unindexing is successful; 2. state reverts to - // SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - // Name: Output only. The fully qualified resource name of the target site. - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` - // ProvidedUriPattern: Required. Input only. The user provided URI pattern from - // which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - // RootDomainUri: Output only. Root domain of the provided_uri_pattern. - RootDomainUri string `json:"rootDomainUri,omitempty"` - // SiteVerificationInfo: Output only. Site ownership and validity verification - // status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be included - // or excluded. +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoos +// tControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: 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: 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 GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + 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 +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. // // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior - // defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") to include in API + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: Failed -// due to insufficient quota. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total quota - // this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveCont +// entSpec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers returned + // in each search result. An extractive answer is a verbatim answer extracted + // from the original document, which provides a precise and contextually + // relevant answer to the search query. If the number of matching answers is + // less than the `max_extractive_answer_count`, return all of the answers. + // Otherwise, return the `max_extractive_answer_count`. At most five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments returned in + // each search result. Only applied if the DataStore is set to + // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is + // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from + // the original document that is relevant to the search query, and, in general, + // more verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. If the number of matching + // segments is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent from + // each selected segments. Return at most `num_previous_segments` segments + // before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec: +// A specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet + // return, use `return_snippet` field. For backwards compatibility, we will + // return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect + // on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be + // returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") 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. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata related -// to the progress of the TrainCustomModel operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec: +// A specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No summary is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that + // are not summary-seeking. The default value is `false`. Google employs + // search-query classification to detect summary-seeking queries. No summary is + // returned if the search query is classified as a non-summary seeking query. + // For example, `why is the sky blue` and `Who is the best soccer player in the + // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` + // are not. They are most likely navigational queries. If this field is set to + // `true`, we skip generating summaries for non-summary seeking queries and + // return fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citations in the summary. The + // default value is `false`. When this field is set to `true`, summaries + // include in-line citation numbers. Example summary including citations: + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business intelligence, + // all within a unified platform [2, 3]. The citation numbers refer to the + // returned search results and are 1-indexed. For example, [1] means that the + // sentence is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // SummaryResultCount: The number of top results to generate the summary from. + // If the number of results returned is less than `summaryResultCount`, the + // summary is generated from all of the results. At most 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response of the -// TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMod +// elPromptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata associated -// with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune applies to. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` - Engine string `json:"engine,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMod +// elSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engine") to include in API + // NullFields is a list of field names (e.g. "Version") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response associated -// with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { -} - -// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec: A struct to +// define data stores to filter on in a search call and configurations for +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. +type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "DataStore") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do semantic +// document retrieval. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "EmbeddingVectors") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec 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"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector: +// Embedding vector. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FieldPath") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: Response -// message for SiteSearchEngineService.BatchCreateTargetSites method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetSites") to +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If set to + // true, the position of this facet among all facets in the response is + // determined automatically. If dynamic facets are enabled, it is ordered + // together. If set to false, the position of this facet in the response is the + // same as in the request, and it is ranked before the facets with dynamic + // position enable and all dynamic facets. For example, you may always want to + // have rating facet returned in the response, but it's not necessarily to + // always display the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet in + // response is determined automatically. Another example, assuming you have the + // following facets in the request: * "rating", enable_dynamic_position = true + // * "price", enable_dynamic_position = false * "brands", + // enable_dynamic_position = false And also you have a dynamic facets enabled, + // which generates a facet `gender`. Then the final order of the facets in the + // response can be ("price", "brands", "rating", "gender") or ("price", + // "brands", "gender", "rating") depends on how API orders "gender" and + // "rating" facets. However, notice that "price" and "brands" are always ranked + // at first and second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By default, + // FacetKey.key is not excluded from the filter unless it is listed in this + // field. Listing a facet key in this field allows its values to appear as + // facet results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. For example, suppose + // there are 100 documents with the color facet "Red" and 200 documents with + // the color facet "Blue". A query containing the filter "color:ANY("Red")" and + // having "color" as FacetKey.key would by default return only "Red" documents + // in the search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" would + // not be shown as an available facet value. If "color" is listed in + // "excludedFilterKeys", then the query returns the facet values "Red" with + // count 100 and "Blue" with count 200, because the "color" key is now excluded + // from the filter. Because this field doesn't affect search results, the + // search results are still correctly filtered to return only "Red" documents. + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error + // is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Limit: Maximum facet values that are returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values above + // 300 are coerced to 300. For aggregation in healthcare search, when the + // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden + // to 10,000 internally, regardless of the value set here. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSites") 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. "EnableDynamicPosition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be -// checked before allowing a behavior -type GoogleCloudDiscoveryengineV1betaCondition struct { - // ActiveTimeRange: Range of time(s) specifying when condition is active. - // Maximum of 10 time ranges. - ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` - // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 - // query terms. - QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: Specifies +// how a facet is computed. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when getting + // faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + // Contains: Only get facet values that contain the given strings. For example, + // suppose "category" has three values "Action > 2022", "Action > 2021" and + // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only + // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual + // fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values are: * + // "count desc", which means order by SearchResponse.Facet.values.count + // descending. * "value desc", which means order by + // SearchResponse.Facet.values.value descending. Only applies to textual + // facets. If not set, textual values are sorted in natural order + // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are + // sorted in the order given by FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + // Prefixes: Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", "Action > + // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" + // facet only contains "Action > 2022" and "Action > 2021". Only supported on + // textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + // RestrictedValues: Only get facet for the given restricted values. Only + // supported on textual fields. For example, suppose "category" has three + // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only contains + // "Action > 2022". Only supported on textual fields. Maximum is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // NullFields is a list of field names (e.g. "CaseInsensitive") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCondition +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search -// request query -type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { - // FullMatch: Whether the search query needs to exactly match the query term. - FullMatch bool `json:"fullMatch,omitempty"` - // Value: The specific query value to match against Must be lowercase, must be - // UTF-8. Can have at most 3 space separated terms if full_match is true. - // Cannot be an empty string. Maximum length of 5000 characters. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullMatch") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies the +// image query input. +type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, + // and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ImageBytes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullMatch") to include in API + // NullFields is a list of field names (e.g. "ImageBytes") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent -// conditions. -type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { - // EndTime: End of time range. Range is inclusive. Must be in the future. - EndTime string `json:"endTime,omitempty"` - // StartTime: Start of time range. Range is inclusive. - 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandi +// ngSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // ServingConfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to -// 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 - // 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 - BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` - // Conditions: Determines when the associated action will trigger. Omit to - // always apply the action. Currently only a single condition may be specified. - // Otherwise an INVALID ARGUMENT error is thrown. - Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` - // DisplayName: Required. Human readable name. The identifier used in UI views. - // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an - // INVALID ARGUMENT error is thrown. - DisplayName string `json:"displayName,omitempty"` - // FilterAction: Defines a filter-type control Currently not supported by - // Recommendation - FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/*/locations/global/dataStore/*/controls/*` - Name string `json:"name,omitempty"` - // RedirectAction: Defines a redirect-type control. - RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` - // SolutionType: Required. Immutable. What solution the control belongs to. - // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT - // error is thrown. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionType string `json:"solutionType,omitempty"` - // SynonymsAction: Treats a group of terms as synonyms of one another. - SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` - // UseCases: Specifies the use case for the control. Affects what condition - // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only - // allow one use case per control. Must be set when solution_type is - // SolutionType.SOLUTION_TYPE_SEARCH. +// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion should +// occur. +type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. Default + // to Condition.DISABLED. // // Possible values: - // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in - // CSS. - // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a - // non-empty query. - // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an - // empty query. - UseCases []string `json:"useCases,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") - // to unconditionally include in API requests. By default, fields with empty or + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this + // case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query is + // used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this field is + // set to true, unexpanded products are always at the top of the search + // results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") 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. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControl +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of -// products in returned list. -type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { - // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative - // boost means demotion. Default is 0.0 (No-op). - Boost float64 `json:"boost,omitempty"` - // DataStore: Required. Specifies which data store's documents can be boosted - // by this control. Full data store name e.g. - // projects/123/locations/global/collections/default_collection/dataStores/defau - // lt_data_store - DataStore string `json:"dataStore,omitempty"` - // Filter: Required. Specifies which products to apply the boost to. If no - // filter is provided all products will be boosted (No-op). Syntax - // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum - // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Boost") to include in API + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} - -// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which -// products may be included in results. Uses same filter as boost. -type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { - // DataStore: Required. Specifies which data store's documents can be filtered - // by this control. Full data store name e.g. - // projects/123/locations/global/collections/default_collection/dataStores/defau - // lt_data_store - DataStore string `json:"dataStore,omitempty"` - // Filter: Required. A filter to apply on the matching condition results. - // Required Syntax documentation: - // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 - // characters. Otherwise an INVALID ARGUMENT error is thrown. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // NullFields is a list of field names (e.g. "QueryId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper -// to the provided URI. -type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { - // RedirectUri: Required. The URI to which the shopper will be redirected. - // Required. URI must have length equal or less than 2000 characters. Otherwise - // an INVALID ARGUMENT error is thrown. - RedirectUri string `json:"redirectUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "RedirectUri") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction replaces the original search + // query. Defaults to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, + // server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a + // suggestion is found, it is put in the SearchResponse.corrected_query. The + // spelling suggestion won't be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RedirectUri") 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. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of -// terms that will act as synonyms of one another. Example: "happy" will also -// be considered as "glad", "glad" will also be considered as "happy". -type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { - // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must - // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. - Synonyms []string `json:"synonyms,omitempty"` - // ForceSendFields is a list of field names (e.g. "Synonyms") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. +type GoogleCloudDiscoveryengineV1alphaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/engines/{engine + // }/sessions/*` + Name string `json:"name,omitempty"` + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,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. "Synonyms") to include in API + // 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 GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction +func (s GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSession return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to -// the progress of the DataStoreService.CreateDataStore operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, including a +// query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { + // Answer: The resource name of the answer to the user query. Only set if the + // answer generation (/answer API call) happened in this turn. + Answer string `json:"answer,omitempty"` + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Answer") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata +func (s GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to -// the progress of the EngineService.CreateEngine operation. This will be +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.SetUriPatternDocumentData operation. This will be // returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -12134,201 +12974,170 @@ type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata +func (s GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create -// Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.SetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse struct { +} + +// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the ownership and + // validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website that + // opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.CreateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata 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. +// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1alphaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated to + // include all pages whose address contains the provided_uri_pattern. If set to + // true, an uri_pattern is generated to try to be an exact match of the + // provided_uri_pattern or just the specific page if the provided_uri_pattern + // is a specific one. provided_uri_pattern is always normalized to generate the + // URI pattern to be used by the search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` + // GeneratedUriPattern: Output only. This is system-generated based on the + // provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be picked up + // by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to be + // deleted. This is a transitioning state which will resulted in either: 1. + // target site deleted if unindexing is successful; 2. state reverts to + // SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + // Name: Output only. The fully qualified resource name of the target site. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + // ProvidedUriPattern: Required. Input only. The user provided URI pattern from + // which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + // RootDomainUri: Output only. Root domain of the provided_uri_pattern. + RootDomainUri string `json:"rootDomainUri,omitempty"` + // SiteVerificationInfo: Output only. Site ownership and validity verification + // status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + // Type: The type of the target site, e.g., whether the site is to be included + // or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior + // defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. The target site's last updated time. UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ExactMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ExactMatch") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCustomTuningModel: Metadata that describes a -// custom tuned model. -type GoogleCloudDiscoveryengineV1betaCustomTuningModel 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. - 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 +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "QuotaFailure") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomTuningModel +func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1betaDataStore struct { - // ContentConfig: Immutable. The content config of the data store. If this - // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. - // - // Possible values: - // "CONTENT_CONFIG_UNSPECIFIED" - Default value. - // "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. - ContentConfig string `json:"contentConfig,omitempty"` - // CreateTime: Output only. Timestamp the DataStore was created at. - CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to - // this data store. - DefaultSchemaId string `json:"defaultSchemaId,omitempty"` - // DisplayName: Required. The data store display name. This field must be a - // UTF-8 encoded string with a length limit of 128 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` - // DocumentProcessingConfig: Configuration for Document understanding and - // enrichment. - DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` - // IndustryVertical: Immutable. The industry vertical that the data store - // registers. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not specific to - // any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - // LanguageInfo: Language info for DataStore. - LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` - // Name: Immutable. The full resource name of the data store. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor - // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length - // limit of 1024 characters. - Name string `json:"name,omitempty"` - // SolutionTypes: The solutions that the data store enrolls. Available - // solutions for each industry_vertical: * `MEDIA`: - // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: - // `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be - // enrolled. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionTypes []string `json:"solutionTypes,omitempty"` - // StartingSchema: 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). - StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: Failed +// due to insufficient quota. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total quota + // this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") 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. "TotalRequiredQuota") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDataStore +func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to -// the progress of the DataStoreService.DeleteDataStore operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata related +// to the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -12347,68 +13156,84 @@ type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata +func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata related to -// the progress of the EngineService.DeleteEngine operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata 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 +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `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. "CreateTime") to include in API + // 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 GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata +func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata associated +// with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection_id + // }/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Engine") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.DeleteTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { +// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response associated +// with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { +} + +// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -12427,16 +13252,15 @@ type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { +// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -12455,255 +13279,204 @@ type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata +func (s GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: Response -// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton -// resource of DataStore. It's empty when DataStore is created, which defaults -// to digital parser. The first call to -// DataStoreService.UpdateDocumentProcessingConfig method will initialize the -// config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { - // ChunkingConfig: Whether chunking mode is enabled. - ChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` - // DefaultParsingConfig: Configurations for default Document parser. If not - // specified, we will configure it as default DigitalParsingConfig, and the - // default parsing config will be applied to all file types for Document - // parsing. - DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - // Name: The full resource name of the Document Processing Config. Format: - // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. - Name string `json:"name,omitempty"` - // ParsingConfigOverrides: Map from file type to override the default parsing - // configuration based on the file type. Supported keys: * `pdf`: Override - // parsing config for PDF files, either digital parsing, ocr parsing or layout - // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and layout parsing are supported. * `docx`: Override parsing - // config for DOCX files, only digital parsing and layout parsing are - // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. - ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to +// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1alphaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must be a + // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This should not be set when using the + // client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is + // set. + UserAgent string `json:"userAgent,omitempty"` + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. Always + // use a hashed value for this ID. Don't set the field to the same fixed ID for + // different users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserId string `json:"userId,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserAgent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkingConfig") 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. "UserAgent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig +func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig: -// Configuration for chunking config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig struct { - // LayoutBasedChunkingConfig: Configuration for the layout based chunking. - LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "LayoutBasedChunkingConfig") - // to unconditionally include in API requests. By default, fields with empty or +// 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"` + // 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. "LayoutBasedChunkingConfig") 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. "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 GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig +func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutB -// asedChunkingConfig: Configuration for the layout based chunking. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { - // ChunkSize: The token size limit for each chunk. Supported values: 100-500 - // (inclusive). Default value: 500. - ChunkSize int64 `json:"chunkSize,omitempty"` - // IncludeAncestorHeadings: Whether to include appending different levels of - // headings to chunks from the middle of the document to prevent context loss. - // Default value: False. - IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkSize") to +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: Response +// message for SiteSearchEngineService.BatchCreateTargetSites method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetSites") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkSize") to include in API + // NullFields is a list of field names (e.g. "TargetSites") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig +func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: -// Related configurations applied to a specific type of document parser. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { - // DigitalParsingConfig: Configurations applied to digital parser. - DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - // LayoutParsingConfig: Configurations applied to layout parser. - LayoutParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` - // OcrParsingConfig: Configurations applied to OCR parser. Currently it only - // applies to PDFs. - OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "DigitalParsingConfig") to +// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1betaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DigitalParsingConfig") 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. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig +func (s GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCondition return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalP -// arsingConfig: The digital parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { -} - -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutPa -// rsingConfig: The layout parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { -} - -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsi -// ngConfig: The OCR parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { - // EnhancedDocumentElements: [DEPRECATED] This field is deprecated. To use the - // additional enhanced document elements processing, please switch to - // `layout_parsing_config`. - EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` - // UseNativeText: If true, will use native text instead of OCR text on pages - // containing native text. - UseNativeText bool `json:"useNativeText,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnhancedDocumentElements") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnhancedDocumentElements") 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. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig +func (s GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata 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 +// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + 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. "CreateTime") to include in API + // 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 GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata +func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: Response -// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the training -// and serving parameters of an Engine. -type GoogleCloudDiscoveryengineV1betaEngine struct { - // ChatEngineConfig: Configurations for the Chat Engine. Only applicable if - // solution_type is SOLUTION_TYPE_CHAT. - ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - // ChatEngineMetadata: Output only. Additional information of the Chat Engine. - // Only applicable if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - // CommonConfig: Common config spec that specifies the metadata of the engine. - CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` - // CreateTime: Output only. Timestamp the Recommendation Engine was created at. - CreateTime string `json:"createTime,omitempty"` - // DataStoreIds: The data stores associated with this engine. For - // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they - // can only associate with at most one data store. If solution_type is - // SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be - // associated here. Note that when used in CreateEngineRequest, one DataStore - // id must be provided as the system will use it for necessary initializations. - DataStoreIds []string `json:"dataStoreIds,omitempty"` - // DisplayName: Required. The display name of the engine. Should be human - // readable. UTF-8 encoded string with limit of 1024 characters. +// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to +// 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 + // 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 + BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. DisplayName string `json:"displayName,omitempty"` - // IndustryVertical: The industry vertical that the engine registers. The - // restriction of the Engine industry vertical is based on DataStore: If - // unspecified, default to `GENERIC`. Vertical on Engine has to match vertical - // of the DataStore linked to the engine. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not specific to - // any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - // Name: Immutable. The fully qualified resource name of the engine. This field - // must be a UTF-8 encoded string with a length limit of 1024 characters. - // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` Name string `json:"name,omitempty"` - // SearchEngineConfig: Configurations for the Search Engine. Only applicable if - // solution_type is SOLUTION_TYPE_SEARCH. - SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` - // SolutionType: Required. The solutions of the engine. + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. // // Possible values: // "SOLUTION_TYPE_UNSPECIFIED" - Default value. @@ -12715,201 +13488,419 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // Generative Chat agent. It's used for Generative chat engine only, the // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. SolutionType string `json:"solutionType,omitempty"` - // UpdateTime: Output only. Timestamp the Recommendation Engine was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to - // unconditionally include in API requests. By default, fields with empty or + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChatEngineConfig") 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. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngine +func (s GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControl return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: Configurations for a -// Chat Engine. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { - // AgentCreationConfig: The configurationt generate the Dialogflow agent that - // is associated to this Engine. Note that these configurations are one-time - // consumed by and passed to Dialogflow service. It means they cannot be - // retrieved using EngineService.GetEngine or EngineService.ListEngines API - // after engine creation. - AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` - // DialogflowAgentToLink: The resource name of an exist Dialogflow agent to - // link to this Chat Engine. Customers can either provide - // `agent_creation_config` to create agent or provide an agent name that links - // the agent with the Chat engine. Format: `projects//locations//agents/`. Note - // that the `dialogflow_agent_to_link` are one-time consumed by and passed to - // Dialogflow service. It means they cannot be retrieved using - // EngineService.GetEngine or EngineService.ListEngines API after engine - // creation. Use ChatEngineMetadata.dialogflow_agent for actual agent - // association after Engine is created. - DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AgentCreationConfig") 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. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig +func (s GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig: -// Configurations for generating a Dialogflow agent. Note that these -// configurations are one-time consumed by and passed to Dialogflow service. It -// means they cannot be retrieved using EngineService.GetEngine or -// EngineService.ListEngines API after engine creation. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { - // Business: Name of the company, organization or other entity that the agent - // represents. Used for knowledge connector LLM prompt and for knowledge - // search. - Business string `json:"business,omitempty"` - // DefaultLanguageCode: Required. The default language of the agent as a - // language tag. See Language Support - // (https://cloud.google.com/dialogflow/docs/reference/language) for a list of - // the currently supported language codes. - DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` - // Location: Agent location for Agent creation, supported values: global/us/eu. - // If not provided, us Engine will create Agent using us-central-1 by default; - // eu Engine will create Agent using eu-west-1 by default. - Location string `json:"location,omitempty"` - // TimeZone: Required. The time zone of the agent from the time zone database - // (https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. - TimeZone string `json:"timeZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Business") to +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Business") to include in API + // NullFields is a list of field names (e.g. "DataStore") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig +func (s GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional -// information of a Chat Engine. Fields in this message are output only. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { - // DialogflowAgent: The resource name of a Dialogflow agent, that this Chat - // Engine refers to. Format: `projects//locations//agents/`. - DialogflowAgent string `json:"dialogflowAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to +// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DialogflowAgent") 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. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations -// for an Engine. -type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { - // CompanyName: The name of the company, business or entity that is associated - // with the engine. Setting this may help improve LLM related features. - CompanyName string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompanyName") to +// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompanyName") to include in API + // NullFields is a list of field names (e.g. "Synonyms") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig +func (s GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: Configurations for -// a Search Engine. -type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { - // SearchAddOns: The add-on that this search engine enables. +// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to +// the progress of the DataStoreService.CreateDataStore operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata 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 GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to +// the progress of the EngineService.CreateEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata 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 GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create +// Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata 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 GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.CreateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata 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 GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCustomTuningModel: Metadata that describes a +// custom tuned model. +type GoogleCloudDiscoveryengineV1betaCustomTuningModel 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: - // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is unspecified. - // This is invalid to use. - // "SEARCH_ADD_ON_LLM" - Large language model add-on. - SearchAddOns []string `json:"searchAddOns,omitempty"` - // SearchTier: The search feature tier of this engine. Different tiers might - // have different pricing. To learn more, check the pricing documentation. - // Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + // "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. + 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 GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomTuningModel + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1betaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If this + // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // // Possible values: - // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is unspecified. - // This is invalid to use. - // "SEARCH_TIER_STANDARD" - Standard tier. - // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. - SearchTier string `json:"searchTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "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. + ContentConfig string `json:"contentConfig,omitempty"` + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + // DisplayName: Required. The data store display name. This field must be a + // UTF-8 encoded string with a length limit of 128 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding and + // enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data store + // registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not specific to + // any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + // LanguageInfo: Language info for DataStore. + LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length + // limit of 1024 characters. + Name string `json:"name,omitempty"` + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: + // `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be + // enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: 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). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,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 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchAddOns") to include in API + // NullFields is a list of field names (e.g. "ContentConfig") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig +func (s GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDataStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata: -// Metadata related to the progress of the ImportCompletionSuggestions -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata struct { +// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to +// the progress of the DataStoreService.DeleteDataStore operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of CompletionSuggestions that failed to be imported. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of CompletionSuggestions successfully imported. - SuccessCount int64 `json:"successCount,omitempty,string"` // UpdateTime: Operation last update time. If the operation is done, this is // also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -12926,50 +13917,98 @@ type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata struct NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata +func (s GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse: -// Response of the CompletionService.ImportCompletionSuggestions method. If the -// long running operation is done, this message is returned by the -// google.longrunning.Operations.response field if the operation is successful. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse struct { - // ErrorConfig: The desired location of errors incurred during the Import. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to +// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata related to +// the progress of the EngineService.DeleteEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata 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. "ErrorConfig") to include in API + // 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 GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse +func (s GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata related to -// the progress of the ImportDocuments operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata 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 GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.DeleteTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata 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 GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // TotalCount: Total count of entries that were processed. - TotalCount int64 `json:"totalCount,omitempty,string"` // UpdateTime: Operation last update time. If the operation is done, this is // also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -12979,478 +14018,2421 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { // https://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 + // 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 GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: Response +// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which defaults +// to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will initialize the +// config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // ChunkingConfig: Whether chunking mode is enabled. + ChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` + // DefaultParsingConfig: Configurations for default Document parser. If not + // specified, we will configure it as default DigitalParsingConfig, and the + // default parsing config will be applied to all file types for Document + // parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + // Name: The full resource name of the Document Processing Config. Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + Name string `json:"name,omitempty"` + // ParsingConfigOverrides: Map from file type to override the default parsing + // configuration based on the file type. Supported keys: * `pdf`: Override + // parsing config for PDF files, either digital parsing, ocr parsing or layout + // parsing is supported. * `html`: Override parsing config for HTML files, only + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig: +// Configuration for chunking config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig struct { + // LayoutBasedChunkingConfig: Configuration for the layout based chunking. + LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "LayoutBasedChunkingConfig") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LayoutBasedChunkingConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutB +// asedChunkingConfig: Configuration for the layout based chunking. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { + // ChunkSize: The token size limit for each chunk. Supported values: 100-500 + // (inclusive). Default value: 500. + ChunkSize int64 `json:"chunkSize,omitempty"` + // IncludeAncestorHeadings: Whether to include appending different levels of + // headings to chunks from the middle of the document to prevent context loss. + // Default value: False. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSize") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkSize") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// Related configurations applied to a specific type of document parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + // LayoutParsingConfig: Configurations applied to layout parser. + LayoutParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` + // OcrParsingConfig: Configurations applied to OCR parser. Currently it only + // applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DigitalParsingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DigitalParsingConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalP +// arsingConfig: The digital parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutPa +// rsingConfig: The layout parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsi +// ngConfig: The OCR parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { + // EnhancedDocumentElements: [DEPRECATED] This field is deprecated. To use the + // additional enhanced document elements processing, please switch to + // `layout_parsing_config`. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + // UseNativeText: If true, will use native text instead of OCR text on pages + // containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnhancedDocumentElements") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnhancedDocumentElements") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata 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 GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: Response +// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the training +// and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1betaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable if + // solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + // ChatEngineMetadata: Output only. Additional information of the Chat Engine. + // Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CommonConfig: Common config spec that specifies the metadata of the engine. + CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` + // CreateTime: Output only. Timestamp the Recommendation Engine was created at. + CreateTime string `json:"createTime,omitempty"` + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they + // can only associate with at most one data store. If solution_type is + // SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be + // associated here. Note that when used in CreateEngineRequest, one DataStore + // id must be provided as the system will use it for necessary initializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + // DisplayName: Required. The display name of the engine. Should be human + // readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + // IndustryVertical: The industry vertical that the engine registers. The + // restriction of the Engine industry vertical is based on DataStore: If + // unspecified, default to `GENERIC`. Vertical on Engine has to match vertical + // of the DataStore linked to the engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not specific to + // any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + // Name: Immutable. The fully qualified resource name of the engine. This field + // must be a UTF-8 encoded string with a length limit of 1024 characters. + // Format: + // `projects/{project_number}/locations/{location}/collections/{collection}/engi + // nes/{engine}` engine should be 1-63 characters, and valid characters are + // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + Name string `json:"name,omitempty"` + // SearchEngineConfig: Configurations for the Search Engine. Only applicable if + // solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChatEngineConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngine + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: Configurations for a +// Chat Engine. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent that + // is associated to this Engine. Note that these configurations are one-time + // consumed by and passed to Dialogflow service. It means they cannot be + // retrieved using EngineService.GetEngine or EngineService.ListEngines API + // after engine creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent to + // link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that links + // the agent with the Chat engine. Format: `projects//locations//agents/`. Note + // that the `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using + // EngineService.GetEngine or EngineService.ListEngines API after engine + // creation. Use ChatEngineMetadata.dialogflow_agent for actual agent + // association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AgentCreationConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig: +// Configurations for generating a Dialogflow agent. Note that these +// configurations are one-time consumed by and passed to Dialogflow service. It +// means they cannot be retrieved using EngineService.GetEngine or +// EngineService.ListEngines API after engine creation. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the agent + // represents. Used for knowledge connector LLM prompt and for knowledge + // search. + Business string `json:"business,omitempty"` + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a list of + // the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + // Location: Agent location for Agent creation, supported values: global/us/eu. + // If not provided, us Engine will create Agent using us-central-1 by default; + // eu Engine will create Agent using eu-west-1 by default. + Location string `json:"location,omitempty"` + // TimeZone: Required. The time zone of the agent from the time zone database + // (https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Business") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Business") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this Chat + // Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DialogflowAgent") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations +// for an Engine. +type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. + CompanyName string `json:"companyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CompanyName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CompanyName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: Configurations for +// a Search Engine. +type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is unspecified. + // This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` + // SearchTier: The search feature tier of this engine. Different tiers might + // have different pricing. To learn more, check the pricing documentation. + // Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is unspecified. + // This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` + // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SearchAddOns") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1betaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1betaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,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 GoogleCloudDiscoveryengineV1betaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1betaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata: +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of CompletionSuggestions that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of CompletionSuggestions successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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 GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse: +// Response of the CompletionService.ImportCompletionSuggestions method. If the +// long running operation is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata related to +// the progress of the ImportDocuments operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // 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 GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of the +// ImportDocumentsRequest. If the long running operation is done, then this +// message is returned by the google.longrunning.Operations.response field if +// the operation was successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an empty, + // existing Cloud Storage directory. Import errors are written to sharded files + // in this directory, one per line, as a JSON-encoded `google.rpc.Status` + // message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsPrefix") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of SampleQuerys that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of SampleQuerys successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse: Response of the +// SampleQueryService.ImportSampleQueries method. If the long running operation +// is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata: +// Metadata related to the progress of the ImportSuggestionDenyListEntries +// operation. This is returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata 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 GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse: +// Response message for CompletionService.ImportSuggestionDenyListEntries +// method. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // FailedEntriesCount: Count of deny list entries that failed to be imported. + FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` + // ImportedEntriesCount: Count of deny list entries successfully imported. + ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata related +// to the progress of the Import operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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 GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of the +// ImportUserEventsRequest. If the long running operation was successful, then +// this message is returned by the google.longrunning.Operations.response field +// if the operation was successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this field + // was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // JoinedEventsCount: Count of user events imported with complete existing + // Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // 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 GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1betaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} + +// GoogleCloudDiscoveryengineV1betaLanguageInfo: Language info for DataStore. +type GoogleCloudDiscoveryengineV1betaLanguageInfo struct { + // Language: Output only. Language part of normalized_language_code. E.g.: + // `en-US` -> `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. + Language string `json:"language,omitempty"` + // LanguageCode: The language code for the DataStore. + LanguageCode string `json:"languageCode,omitempty"` + // NormalizedLanguageCode: Output only. This is the normalized form of + // language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` + // will have normalized_language_code of `en-GB`. + NormalizedLanguageCode string `json:"normalizedLanguageCode,omitempty"` + // Region: Output only. Region part of normalized_language_code, if present. + // E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "Language") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Language") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaLanguageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaLanguageInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaListCustomModelsResponse: Response message +// for SearchTuningService.ListCustomModels method. +type GoogleCloudDiscoveryengineV1betaListCustomModelsResponse struct { + // Models: List of custom tuning models. + Models []*GoogleCloudDiscoveryengineV1betaCustomTuningModel `json:"models,omitempty"` + // 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 GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListCustomModelsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1betaProject struct { + // CreateTime: Output only. The timestamp when this project is created. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,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 GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProject + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the +// terms of service. +type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata +// associated with a project provision operation. +type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to +// the progress of the PurgeDocuments operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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 GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for +// DocumentService.PurgeDocuments method. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + // PurgeSample: A sample of document names that will be deleted. Only populated + // if `force` is set to false. A max of 100 names will be returned and the + // names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PurgeCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: +// Metadata related to the progress of the PurgeSuggestionDenyListEntries +// operation. This is returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata 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 GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse: +// Response message for CompletionService.PurgeSuggestionDenyListEntries +// method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // PurgeCount: Number of suggestion deny list entries purged. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1betaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocNdcg") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics: Stores the metric +// values at specific top-k levels. +type GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of +// a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + // Name: Immutable. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "JsonSchema") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave + // this field empty, to search documents under the default branch. + Branch string `json:"branch,omitempty"` + // CanonicalFilter: The default filter that is applied when a user performs a + // search without checking any filters on the search page. The filter applied + // to every search request when quality improvement such as query expansion is + // needed. In the case a query does not have a sufficient amount of results + // this filter will be used to determine whether or not to enable the query + // expansion flow. The original filter will still be used for the query + // expanded search. This field is strongly recommended to achieve high search + // quality. For more information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of content + // search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it + // will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no facets are + // returned. A maximum of 100 values are allowed. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For + // more information, see Standard fields + // (https://cloud.google.com/apis/design/standard_fields). This field helps to + // better interpret the query. If a value isn't specified, the query language + // code is automatically detected, which may not be accurate. + LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that is, + // starting result location, amongst the Documents deemed by the API as + // relevant) in search results. This field is only considered if page_token is + // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering + // for retail search, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field + // is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of Documents to return. The maximum allowed value + // depends on the data type. Values above the maximum value are coerced to the + // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * + // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: + // Default `50`, Maximum `100`. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to SearchService.Search must match the call that + // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageToken string `json:"pageToken,omitempty"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. If set + // to non-empty, results are restricted or boosted based on the location + // provided. For example, `user_country_code: "au" For available codes see + // Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which enables + // image searching. For example, `search_type: 1` + Params googleapi.RawMessage `json:"params,omitempty"` + // Query: Raw search query. + Query string `json:"query,omitempty"` + // QueryExpansionSpec: The query expansion specification that specifies the + // conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. This overrides ServingConfig.ranking_expression. The + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RegionCode: 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. + RegionCode string `json:"regionCode,omitempty"` + // SafeSearch: Whether to turn on safe search. This is only supported for + // website search. + SafeSearch bool `json:"safeSearch,omitempty"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` + // SpellCorrectionSpec: The spell correction specification that specifies the + // mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // UserInfo: Information about the end user. Highly recommended for analytics. + // UserInfo.user_agent is used to deduce `device_type` for analytics. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. This should be the same + // identifier as UserEvent.user_pseudo_id and + // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoostSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost specification +// to boost certain documents. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document matches + // multiple conditions in the specifictions, boost scores from these + // specifications are all applied and combined in a non-linear way. Maximum + // number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec: +// Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a + // big promotion. However, it does not necessarily mean that the boosted + // document will be the top result at all times, nor that other documents will + // be excluded. Results could still be shown even when none of them matches the + // condition. And results that are significantly more relevant to the search + // query can still trump your heavily favored but irrelevant documents. Setting + // to -1.0 gives the document a big demotion. However, results that are deeply + // relevant might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. Setting to + // 0.0 means no boost applied. The boosting condition is ignored. Only one of + // the (condition, boost) combination or the boost_control_spec below are set. + // If both are set then the global boost is ignored and the more fine-grained + // boost_control_spec is applied. + Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` + // Condition: An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * To boost + // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": + // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpec: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: 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]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: 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: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + 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 +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveConte +// ntSpec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers returned + // in each search result. An extractive answer is a verbatim answer extracted + // from the original document, which provides a precise and contextually + // relevant answer to the search query. If the number of matching answers is + // less than the `max_extractive_answer_count`, return all of the answers. + // Otherwise, return the `max_extractive_answer_count`. At most five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments returned in + // each search result. Only applied if the DataStore is set to + // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is + // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from + // the original document that is relevant to the search query, and, in general, + // more verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. If the number of matching + // segments is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent from + // each selected segments. Return at most `num_previous_segments` segments + // before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet + // return, use `return_snippet` field. For backwards compatibility, we will + // return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect + // on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be + // returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No summary is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that + // are not summary-seeking. The default value is `false`. Google employs + // search-query classification to detect summary-seeking queries. No summary is + // returned if the search query is classified as a non-summary seeking query. + // For example, `why is the sky blue` and `Who is the best soccer player in the + // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` + // are not. They are most likely navigational queries. If this field is set to + // `true`, we skip generating summaries for non-summary seeking queries and + // return fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citations in the summary. The + // default value is `false`. When this field is set to `true`, summaries + // include in-line citation numbers. Example summary including citations: + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business intelligence, + // all within a unified platform [2, 3]. The citation numbers refer to the + // returned search results and are 1-indexed. For example, [1] means that the + // sentence is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // SummaryResultCount: The number of top results to generate the summary from. + // If the number of results returned is less than `summaryResultCount`, the + // summary is generated from all of the results. At most 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of the -// ImportDocumentsRequest. If the long running operation is done, then this -// message is returned by the google.longrunning.Operations.response field if -// the operation was successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lPromptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an empty, - // existing Cloud Storage directory. Import errors are written to sharded files - // in this directory, one per line, as a JSON-encoded `google.rpc.Status` - // message. - GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in API + // NullFields is a list of field names (e.g. "Version") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata: -// Metadata related to the progress of the ImportSuggestionDenyListEntries -// operation. This is returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct to +// define data stores to filter on in a search call and configurations for +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. +type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "DataStore") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse: -// Response message for CompletionService.ImportSuggestionDenyListEntries -// method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // FailedEntriesCount: Count of deny list entries that failed to be imported. - FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` - // ImportedEntriesCount: Count of deny list entries successfully imported. - ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do semantic +// document retrieval. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") 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. "EmbeddingVectors") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata related -// to the progress of the Import operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector: +// Embedding vector. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FieldPath") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of the -// ImportUserEventsRequest. If the long running operation was successful, then -// this message is returned by the google.longrunning.Operations.response field -// if the operation was successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this field - // was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // JoinedEventsCount: Count of user events imported with complete existing - // Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` - // 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 GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil } -// GoogleCloudDiscoveryengineV1betaLanguageInfo: Language info for DataStore. -type GoogleCloudDiscoveryengineV1betaLanguageInfo struct { - // Language: Output only. Language part of normalized_language_code. E.g.: - // `en-US` -> `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. - Language string `json:"language,omitempty"` - // LanguageCode: The language code for the DataStore. - LanguageCode string `json:"languageCode,omitempty"` - // NormalizedLanguageCode: Output only. This is the normalized form of - // language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` - // will have normalized_language_code of `en-GB`. - NormalizedLanguageCode string `json:"normalizedLanguageCode,omitempty"` - // Region: Output only. Region part of normalized_language_code, if present. - // E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Language") to +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If set to + // true, the position of this facet among all facets in the response is + // determined automatically. If dynamic facets are enabled, it is ordered + // together. If set to false, the position of this facet in the response is the + // same as in the request, and it is ranked before the facets with dynamic + // position enable and all dynamic facets. For example, you may always want to + // have rating facet returned in the response, but it's not necessarily to + // always display the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet in + // response is determined automatically. Another example, assuming you have the + // following facets in the request: * "rating", enable_dynamic_position = true + // * "price", enable_dynamic_position = false * "brands", + // enable_dynamic_position = false And also you have a dynamic facets enabled, + // which generates a facet `gender`. Then the final order of the facets in the + // response can be ("price", "brands", "rating", "gender") or ("price", + // "brands", "gender", "rating") depends on how API orders "gender" and + // "rating" facets. However, notice that "price" and "brands" are always ranked + // at first and second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By default, + // FacetKey.key is not excluded from the filter unless it is listed in this + // field. Listing a facet key in this field allows its values to appear as + // facet results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. For example, suppose + // there are 100 documents with the color facet "Red" and 200 documents with + // the color facet "Blue". A query containing the filter "color:ANY("Red")" and + // having "color" as FacetKey.key would by default return only "Red" documents + // in the search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" would + // not be shown as an available facet value. If "color" is listed in + // "excludedFilterKeys", then the query returns the facet values "Red" with + // count 100 and "Blue" with count 200, because the "color" key is now excluded + // from the filter. Because this field doesn't affect search results, the + // search results are still correctly filtered to return only "Red" documents. + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error + // is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Limit: Maximum facet values that are returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values above + // 300 are coerced to 300. For aggregation in healthcare search, when the + // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden + // to 10,000 internally, regardless of the value set here. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Language") 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. "EnableDynamicPosition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaLanguageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaLanguageInfo +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListCustomModelsResponse: Response message -// for SearchTuningService.ListCustomModels method. -type GoogleCloudDiscoveryengineV1betaListCustomModelsResponse struct { - // Models: List of custom tuning models. - Models []*GoogleCloudDiscoveryengineV1betaCustomTuningModel `json:"models,omitempty"` - // 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: Specifies +// how a facet is computed. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when getting + // faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + // Contains: Only get facet values that contain the given strings. For example, + // suppose "category" has three values "Action > 2022", "Action > 2021" and + // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only + // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual + // fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values are: * + // "count desc", which means order by SearchResponse.Facet.values.count + // descending. * "value desc", which means order by + // SearchResponse.Facet.values.value descending. Only applies to textual + // facets. If not set, textual values are sorted in natural order + // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are + // sorted in the order given by FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + // Prefixes: Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", "Action > + // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" + // facet only contains "Action > 2022" and "Action > 2021". Only supported on + // textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + // RestrictedValues: Only get facet for the given restricted values. Only + // supported on textual fields. For example, suppose "category" has three + // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only contains + // "Action > 2022". Only supported on textual fields. Maximum is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "CaseInsensitive") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListCustomModelsResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a -// Google Cloud project in the service. -type GoogleCloudDiscoveryengineV1betaProject struct { - // CreateTime: Output only. The timestamp when this project is created. - CreateTime string `json:"createTime,omitempty"` - // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in - // project number. - Name string `json:"name,omitempty"` - // ProvisionCompletionTime: Output only. The timestamp when this project is - // successfully provisioned. Empty value means this project is still - // provisioning and is not ready for use. - ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` - // ServiceTermsMap: Output only. A map of terms of services. The key is the - // `id` of ServiceTerms. - ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies the image +// query input. +type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, + // and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ImageBytes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ImageBytes") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaProject +func (s GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the -// terms of service. -type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { - // AcceptTime: The last time when the project agreed to the terms of service. - AcceptTime string `json:"acceptTime,omitempty"` - // DeclineTime: The last time when the project declined or revoked the - // agreement to terms of service. - DeclineTime string `json:"declineTime,omitempty"` - // Id: The unique identifier of this terms of service. Available terms: * - // `GA_DATA_USE_TERMS`: Terms for data use - // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, - // the acceptable version to provide is `2022-11-23`. - Id string `json:"id,omitempty"` - // State: Whether the project has accepted/rejected the service terms or it is - // still pending. +// GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandin +// gSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. // // Possible values: - // "STATE_UNSPECIFIED" - The default value of the enum. This value is not - // actually used. - // "TERMS_ACCEPTED" - The project has given consent to the terms of service. - // "TERMS_PENDING" - The project is pending to review and accept the terms of - // service. - // "TERMS_DECLINED" - The project has declined or revoked the agreement to - // terms of service. - State string `json:"state,omitempty"` - // Version: The version string of the terms of service. For acceptable values, - // see the comments for id above. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceptTime") to - // unconditionally include in API requests. By default, fields with empty or + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // ServingConfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceptTime") 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. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms +func (s GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata -// associated with a project provision operation. -type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { -} - -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to -// the progress of the PurgeDocuments operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // IgnoredCount: Count of entries that were ignored as entries were not found. - IgnoredCount int64 `json:"ignoredCount,omitempty,string"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion should +// occur. +type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. Default + // to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this + // case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query is + // used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this field is + // set to true, unexpanded products are always at the top of the search + // results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for -// DocumentService.PurgeDocuments method. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` - // PurgeSample: A sample of document names that will be deleted. Only populated - // if `force` is set to false. A max of 100 names will be returned and the - // names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to +// GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in API + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: -// Metadata related to the progress of the PurgeSuggestionDenyListEntries -// operation. This is returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse: -// Response message for CompletionService.PurgeSuggestionDenyListEntries -// method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // PurgeCount: Number of suggestion deny list entries purged. - PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // NullFields is a list of field names (e.g. "QueryId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of -// a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - // Name: Immutable. The full resource name of the schema, in the format of - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction replaces the original search + // query. Defaults to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, + // server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a + // suggestion is found, it is put in the SearchResponse.corrected_query. The + // spelling suggestion won't be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") 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. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } @@ -13754,6 +16736,41 @@ func (s GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1betaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must be a + // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This should not be set when using the + // client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is + // set. + UserAgent string `json:"userAgent,omitempty"` + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. Always + // use a hashed value for this ID. Don't set the field to the same fixed ID for + // different users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserId string `json:"userId,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserAgent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UserAgent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleLongrunningCancelOperationRequest: The request message for // Operations.CancelOperation. type GoogleLongrunningCancelOperationRequest struct { @@ -33446,6 +36463,266 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOp return ret, nil } +type ProjectsLocationsIdentityMappingStoresOperationsGetCall 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 *ProjectsLocationsIdentityMappingStoresOperationsService) Get(name string) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + c := &ProjectsLocationsIdentityMappingStoresOperationsGetCall{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 *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + 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 *ProjectsLocationsIdentityMappingStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) 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 "discoveryengine.projects.locations.identity_mapping_stores.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 *ProjectsLocationsIdentityMappingStoresOperationsGetCall) 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 ProjectsLocationsIdentityMappingStoresOperationsListCall 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 *ProjectsLocationsIdentityMappingStoresOperationsService) List(name string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c := &ProjectsLocationsIdentityMappingStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Filter(filter string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + 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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + 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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) 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}/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.identity_mapping_stores.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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) 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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) 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 ProjectsLocationsOperationsGetCall struct { s *Service name string diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 9cb034d5b09..668cc35314d 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -2428,6 +2428,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "getUriPatternDocumentData": { + "description": "Gets the URI Pattern to Document data mapping for an Advanced Site Search DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:getUriPatternDocumentData", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.getUriPatternDocumentData", + "parameterOrder": [ + "siteSearchEngine" + ], + "parameters": { + "siteSearchEngine": { + "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+siteSearchEngine}:getUriPatternDocumentData", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recrawlUris": { "description": "Request on-demand recrawl for a list of URIs.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", @@ -2455,6 +2480,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "setUriPatternDocumentData": { + "description": "Sets the URI Pattern to Document data mapping for an Advanced Site Search DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:setUriPatternDocumentData", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.setUriPatternDocumentData", + "parameterOrder": [ + "siteSearchEngine" + ], + "parameters": { + "siteSearchEngine": { + "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+siteSearchEngine}:setUriPatternDocumentData", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -6377,6 +6430,133 @@ } }, "evaluations": { + "methods": { + "create": { + "description": "Creates a Evaluation. Upon creation, the evaluation will be automatically triggered and begin execution.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.evaluations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/evaluations", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluation" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Evaluation.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Evaluation, such as `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the caller does not have permission to access the Evaluation, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Evaluation does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of Evaluations.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list Evaluations under this location, regardless of whether or not this location exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/evaluations", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listResults": { + "description": "Gets a list of results for a given a Evaluation.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}:listResults", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.listResults", + "parameterOrder": [ + "evaluation" + ], + "parameters": { + "evaluation": { + "description": "Required. The evaluation resource name, such as `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the caller does not have permission to list EvaluationResult under this evaluation, regardless of whether or not this evaluation set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum number of EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+evaluation}:listResults", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -6441,6 +6621,80 @@ } } }, + "identity_mapping_stores": { + "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}/identity_mapping_stores/{identity_mapping_storesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.identity_mapping_stores.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/identity_mapping_stores/[^/]+/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}/identity_mapping_stores/{identity_mapping_storesId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.identity_mapping_stores.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/[^/]+/identity_mapping_stores/[^/]+$", + "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" + ] + } + } + } + } + }, "operations": { "methods": { "get": { @@ -6576,529 +6830,1753 @@ } }, "sampleQuerySets": { - "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}/sampleQuerySets/{sampleQuerySetsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.sampleQuerySets.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "userEvents": { "methods": { - "collect": { - "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:collect", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.userEvents.collect", + "create": { + "description": "Creates a SampleQuerySet", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.create", "parameterOrder": [ "parent" ], "parameters": { - "ets": { - "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - "format": "int64", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "uri": { - "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "sampleQuerySetId": { + "description": "Required. The ID to use for the SampleQuerySet, which will become the final component of the SampleQuerySet.name. If the caller does not have permission to create the SampleQuerySet, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all SampleQuerySets with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" - }, - "userEvent": { - "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - "location": "query", + } + }, + "path": "v1alpha/{+parent}/sampleQuerySets", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a SampleQuerySet.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.sampleQuerySets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuerySet, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to delete the SampleQuerySet, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the SampleQuerySet to delete does not exist, a `NOT_FOUND` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, "type": "string" } }, - "path": "v1alpha/{+parent}/userEvents:collect", + "path": "v1alpha/{+name}", "response": { - "$ref": "GoogleApiHttpBody" + "$ref": "GoogleProtobufEmpty" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "write": { - "description": "Writes a single user event.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:write", - "httpMethod": "POST", - "id": "discoveryengine.projects.locations.userEvents.write", + "get": { + "description": "Gets a SampleQuerySet.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuerySet, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to access the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested SampleQuerySet does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of SampleQuerySets.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.list", "parameterOrder": [ "parent" ], "parameters": { + "pageSize": { + "description": "Maximum number of SampleQuerySets to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListSampleQuerySetsResponse.next_page_token, received from a previous SampleQuerySetService.ListSampleQuerySets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SampleQuerySetService.ListSampleQuerySets must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", + "description": "Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list SampleQuerySets under this location, regardless of whether or not this location exists, a `PERMISSION_DENIED` error is returned.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + } + }, + "path": "v1alpha/{+parent}/sampleQuerySets", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a SampleQuerySet.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.sampleQuerySets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the SampleQuerySet, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" }, - "writeAsync": { - "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "updateMask": { + "description": "Indicates which fields in the provided imported 'sample query set' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", "location": "query", - "type": "boolean" + "type": "string" } }, - "path": "v1alpha/{+parent}/userEvents:write", + "path": "v1alpha/{+name}", "request": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" }, "response": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } - } - } - } - }, - "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}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/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}/operations", - "httpMethod": "GET", - "id": "discoveryengine.projects.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/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" + "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}/sampleQuerySets/{sampleQuerySetsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } }, - "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" - ] - } - } - } - } - } - }, - "revision": "20240704", - "rootUrl": "https://discoveryengine.googleapis.com/", - "schemas": { - "GoogleApiDistribution": { - "description": "`Distribution` contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths. Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.", - "id": "GoogleApiDistribution", - "properties": { - "bucketCounts": { - "description": "The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" - }, - "bucketOptions": { - "$ref": "GoogleApiDistributionBucketOptions", - "description": "Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field." - }, - "count": { - "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in `bucket_counts` if a histogram is provided.", - "format": "int64", - "type": "string" - }, - "exemplars": { - "description": "Must be in increasing order of `value` field.", - "items": { - "$ref": "GoogleApiDistributionExemplar" - }, - "type": "array" - }, - "mean": { - "description": "The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.", - "format": "double", - "type": "number" - }, - "range": { - "$ref": "GoogleApiDistributionRange", - "description": "If specified, contains the range of the population values. The field must not be present if the `count` is zero." - }, - "sumOfSquaredDeviation": { - "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, \"The Art of Computer Programming\", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` is zero then this field must be zero.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "GoogleApiDistributionBucketOptions": { - "description": "`BucketOptions` describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. `BucketOptions` does not include the number of values in each bucket. A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", - "id": "GoogleApiDistributionBucketOptions", - "properties": { - "explicitBuckets": { - "$ref": "GoogleApiDistributionBucketOptionsExplicit", - "description": "The explicit buckets." - }, - "exponentialBuckets": { - "$ref": "GoogleApiDistributionBucketOptionsExponential", - "description": "The exponential buckets." - }, - "linearBuckets": { - "$ref": "GoogleApiDistributionBucketOptionsLinear", - "description": "The linear bucket." - } - }, - "type": "object" - }, + "sampleQueries": { + "methods": { + "create": { + "description": "Creates a SampleQuery", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + }, + "sampleQueryId": { + "description": "Required. The ID to use for the SampleQuery, which will become the final component of the SampleQuery.name. If the caller does not have permission to create the SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all SampleQuerys with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sampleQueries", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a SampleQuery.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuery, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. If the caller does not have permission to delete the SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the SampleQuery to delete does not exist, a `NOT_FOUND` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a SampleQuery.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuery, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. If the caller does not have permission to access the SampleQuery, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested SampleQuery does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of multiple SampleQuerys. Sample queries that already exist may be deleted. Note: It is possible for a subset of the SampleQuerys to be successfully imported.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list SampleQuerys under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sampleQueries:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of SampleQuerys.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of SampleQuerys to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListSampleQueriesResponse.next_page_token, received from a previous SampleQueryService.ListSampleQueries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SampleQueryService.ListSampleQueries must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list SampleQuerys under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sampleQueries", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a SampleQuery.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the sample query, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided imported 'simple query' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "userEvents": { + "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "write": { + "description": "Writes a single user event.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/userEvents:write", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.userEvents.write", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1alpha/{+parent}/userEvents:write", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/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}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.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/[^/]+$", + "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" + ] + } + } + } + } + } + }, + "revision": "20240715", + "rootUrl": "https://discoveryengine.googleapis.com/", + "schemas": { + "GoogleApiDistribution": { + "description": "`Distribution` contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets. The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths. Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the `mean` and `sum_of_squared_deviation` fields meaningless.", + "id": "GoogleApiDistribution", + "properties": { + "bucketCounts": { + "description": "The number of values in each bucket of the histogram, as described in `bucket_options`. If the distribution does not have a histogram, then omit this field. If there is a histogram, then the sum of the values in `bucket_counts` must equal the value in the `count` field of the distribution. If present, `bucket_counts` should contain N values, where N is the number of buckets specified in `bucket_options`. If you supply fewer than N values, the remaining values are assumed to be 0. The order of the values in `bucket_counts` follows the bucket numbering schemes described for the three bucket types. The first value must be the count for the underflow bucket (number 0). The next N-2 values are the counts for the finite buckets (number 1 through N-2). The N'th value in `bucket_counts` is the count for the overflow bucket (number N-1).", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "bucketOptions": { + "$ref": "GoogleApiDistributionBucketOptions", + "description": "Defines the histogram bucket boundaries. If the distribution does not contain a histogram, then omit this field." + }, + "count": { + "description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in `bucket_counts` if a histogram is provided.", + "format": "int64", + "type": "string" + }, + "exemplars": { + "description": "Must be in increasing order of `value` field.", + "items": { + "$ref": "GoogleApiDistributionExemplar" + }, + "type": "array" + }, + "mean": { + "description": "The arithmetic mean of the values in the population. If `count` is zero then this field must be zero.", + "format": "double", + "type": "number" + }, + "range": { + "$ref": "GoogleApiDistributionRange", + "description": "If specified, contains the range of the population values. The field must not be present if the `count` is zero." + }, + "sumOfSquaredDeviation": { + "description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, \"The Art of Computer Programming\", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass. If `count` is zero then this field must be zero.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptions": { + "description": "`BucketOptions` describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. `BucketOptions` does not include the number of values in each bucket. A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i \u003e 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", + "id": "GoogleApiDistributionBucketOptions", + "properties": { + "explicitBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsExplicit", + "description": "The explicit buckets." + }, + "exponentialBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsExponential", + "description": "The exponential buckets." + }, + "linearBuckets": { + "$ref": "GoogleApiDistributionBucketOptionsLinear", + "description": "The linear bucket." + } + }, + "type": "object" + }, "GoogleApiDistributionBucketOptionsExplicit": { "description": "Specifies a set of buckets with arbitrary widths. There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): bounds[i] Lower bound (1 \u003c= i \u003c N); bounds[i - 1] The `bounds` field must contain at least one element. If `bounds` has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", "id": "GoogleApiDistributionBucketOptionsExplicit", "properties": { - "bounds": { - "description": "The values must be monotonically increasing.", + "bounds": { + "description": "The values must be monotonically increasing.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptionsExponential": { + "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", + "id": "GoogleApiDistributionBucketOptionsExponential", + "properties": { + "growthFactor": { + "description": "Must be greater than 1.", + "format": "double", + "type": "number" + }, + "numFiniteBuckets": { + "description": "Must be greater than 0.", + "format": "int32", + "type": "integer" + }, + "scale": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionBucketOptionsLinear": { + "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", + "id": "GoogleApiDistributionBucketOptionsLinear", + "properties": { + "numFiniteBuckets": { + "description": "Must be greater than 0.", + "format": "int32", + "type": "integer" + }, + "offset": { + "description": "Lower bound of the first bucket.", + "format": "double", + "type": "number" + }, + "width": { + "description": "Must be greater than 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionExemplar": { + "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", + "id": "GoogleApiDistributionExemplar", + "properties": { + "attachments": { + "description": "Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "timestamp": { + "description": "The observation (sampling) time of the above value.", + "format": "google-datetime", + "type": "string" + }, + "value": { + "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiDistributionRange": { + "description": "The range of the population values.", + "id": "GoogleApiDistributionRange", + "properties": { + "max": { + "description": "The maximum of the population values.", + "format": "double", + "type": "number" + }, + "min": { + "description": "The minimum of the population values.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleApiHttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "GoogleApiHttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleApiMonitoredResource": { + "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `\"gce_instance\"` has labels `\"project_id\"`, `\"instance_id\"` and `\"zone\"`: { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }}", + "id": "GoogleApiMonitoredResource", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `\"project_id\"`, `\"instance_id\"`, and `\"zone\"`.", + "type": "object" + }, + "type": { + "description": "Required. The monitored resource type. This field must match the `type` field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is `gce_instance`. Some descriptors include the service name in the type; for example, the type of a Datastream stream is `datastream.googleapis.com/Stream`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingErrorContext": { + "description": "A description of the context in which an error occurred.", + "id": "GoogleCloudDiscoveryengineLoggingErrorContext", + "properties": { + "httpRequest": { + "$ref": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "description": "The HTTP request which was processed when the error was triggered." + }, + "reportLocation": { + "$ref": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingErrorLog": { + "description": "An error log which is reported to the Error Reporting system.", + "id": "GoogleCloudDiscoveryengineLoggingErrorLog", + "properties": { + "context": { + "$ref": "GoogleCloudDiscoveryengineLoggingErrorContext", + "description": "A description of the context in which the error occurred." + }, + "importPayload": { + "$ref": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "description": "The error payload that is populated on LRO import APIs." + }, + "message": { + "description": "A message describing the error.", + "type": "string" + }, + "requestPayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest`", + "type": "object" + }, + "responsePayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent`", + "type": "object" + }, + "serviceContext": { + "$ref": "GoogleCloudDiscoveryengineLoggingServiceContext", + "description": "The service context in which this error has occurred." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The RPC status associated with the error log." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingHttpRequestContext": { + "description": "HTTP request data that is related to a reported error.", + "id": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "properties": { + "responseStatusCode": { + "description": "The HTTP response status code for the request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingImportErrorContext": { + "description": "The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents`", + "id": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "properties": { + "document": { + "description": "The detailed content which caused the error on importing a document.", + "type": "string" + }, + "gcsPath": { + "description": "Google Cloud Storage file path of the import source. Can be set for batch operation error.", + "type": "string" + }, + "lineNumber": { + "description": "Line number of the content in file. Should be empty for permission or batch operation error.", + "type": "string" + }, + "operation": { + "description": "The operation resource name of the LRO.", + "type": "string" + }, + "userEvent": { + "description": "The detailed content which caused the error on importing a user event.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingServiceContext": { + "description": "Describes a running service that sends errors.", + "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "properties": { + "service": { + "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingSourceLocation": { + "description": "Indicates a location in the source code of the service for which errors are reported.", + "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "properties": { + "functionName": { + "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", + "properties": { + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Condition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1Condition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Control": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "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.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Condition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1CreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateEngineMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1CreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1CreateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1DataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1DataStore", + "properties": { + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "type": "array" + }, + "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)." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1DeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteEngineMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." + }, + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", + "properties": { + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." + }, + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", "items": { - "format": "double", - "type": "number" + "type": "string" }, "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" } }, "type": "object" }, - "GoogleApiDistributionBucketOptionsExponential": { - "description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): scale * (growth_factor ^ i). Lower bound (1 \u003c= i \u003c N): scale * (growth_factor ^ (i - 1)).", - "id": "GoogleApiDistributionBucketOptionsExponential", + "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", "properties": { - "growthFactor": { - "description": "Must be greater than 1.", - "format": "double", - "type": "number" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "format": "int32", - "type": "integer" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Engine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1Engine", + "properties": { + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" }, - "scale": { - "description": "Must be greater than 0.", - "format": "double", - "type": "number" + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "GoogleApiDistributionBucketOptionsLinear": { - "description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the following boundaries: Upper bound (0 \u003c= i \u003c N-1): offset + (width * i). Lower bound (1 \u003c= i \u003c N): offset + (width * (i - 1)).", - "id": "GoogleApiDistributionBucketOptionsLinear", + "GoogleCloudDiscoveryengineV1EngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", "properties": { - "numFiniteBuckets": { - "description": "Must be greater than 0.", - "format": "int32", - "type": "integer" - }, - "offset": { - "description": "Lower bound of the first bucket.", - "format": "double", - "type": "number" + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "width": { - "description": "Must be greater than 0.", - "format": "double", - "type": "number" + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" } }, "type": "object" }, - "GoogleApiDistributionExemplar": { - "description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", - "id": "GoogleApiDistributionExemplar", + "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", "properties": { - "attachments": { - "description": "Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" }, - "timestamp": { - "description": "The observation (sampling) time of the above value.", - "format": "google-datetime", + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", "type": "string" }, - "value": { - "description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", - "format": "double", - "type": "number" + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" } }, "type": "object" }, - "GoogleApiDistributionRange": { - "description": "The range of the population values.", - "id": "GoogleApiDistributionRange", + "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", "properties": { - "max": { - "description": "The maximum of the population values.", - "format": "double", - "type": "number" - }, - "min": { - "description": "The minimum of the population values.", - "format": "double", - "type": "number" + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" } }, "type": "object" }, - "GoogleApiHttpBody": { - "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", - "id": "GoogleApiHttpBody", + "GoogleCloudDiscoveryengineV1EngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "properties": { - "contentType": { - "description": "The HTTP Content-Type header value specifying the content type of the body.", - "type": "string" - }, - "data": { - "description": "The HTTP request/response body as raw binary.", - "format": "byte", + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" - }, - "extensions": { - "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" } }, "type": "object" }, - "GoogleApiMonitoredResource": { - "description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The `type` field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the `labels` field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for `\"gce_instance\"` has labels `\"project_id\"`, `\"instance_id\"` and `\"zone\"`: { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }}", - "id": "GoogleApiMonitoredResource", + "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", "properties": { - "labels": { - "additionalProperties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], "type": "string" }, - "description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels `\"project_id\"`, `\"instance_id\"`, and `\"zone\"`.", - "type": "object" + "type": "array" }, - "type": { - "description": "Required. The monitored resource type. This field must match the `type` field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is `gce_instance`. Some descriptors include the service name in the type; for example, the type of a Datastream stream is `datastream.googleapis.com/Stream`.", + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingErrorContext": { - "description": "A description of the context in which an error occurred.", - "id": "GoogleCloudDiscoveryengineLoggingErrorContext", - "properties": { - "httpRequest": { - "$ref": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", - "description": "The HTTP request which was processed when the error was triggered." - }, - "reportLocation": { - "$ref": "GoogleCloudDiscoveryengineLoggingSourceLocation", - "description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineLoggingErrorLog": { - "description": "An error log which is reported to the Error Reporting system.", - "id": "GoogleCloudDiscoveryengineLoggingErrorLog", + "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata", "properties": { - "context": { - "$ref": "GoogleCloudDiscoveryengineLoggingErrorContext", - "description": "A description of the context in which the error occurred." - }, - "importPayload": { - "$ref": "GoogleCloudDiscoveryengineLoggingImportErrorContext", - "description": "The error payload that is populated on LRO import APIs." - }, - "message": { - "description": "A message describing the error.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "requestPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest`", - "type": "object" - }, - "responsePayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent`", - "type": "object" + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" }, - "serviceContext": { - "$ref": "GoogleCloudDiscoveryengineLoggingServiceContext", - "description": "The service context in which this error has occurred." + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "type": "string" }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The RPC status associated with the error log." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingHttpRequestContext": { - "description": "HTTP request data that is related to a reported error.", - "id": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse", "properties": { - "responseStatusCode": { - "description": "The HTTP response status code for the request.", - "format": "int32", - "type": "integer" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingImportErrorContext": { - "description": "The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents`", - "id": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata", "properties": { - "document": { - "description": "The detailed content which caused the error on importing a document.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "gcsPath": { - "description": "Google Cloud Storage file path of the import source. Can be set for batch operation error.", + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", "type": "string" }, - "lineNumber": { - "description": "Line number of the content in file. Should be empty for permission or batch operation error.", + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", "type": "string" }, - "operation": { - "description": "The operation resource name of the LRO.", + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", "type": "string" }, - "userEvent": { - "description": "The detailed content which caused the error on importing a user event.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingServiceContext": { - "description": "Describes a running service that sends errors.", - "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "GoogleCloudDiscoveryengineV1ImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1ImportDocumentsResponse", "properties": { - "service": { - "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", - "type": "string" + "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 request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingSourceLocation": { - "description": "Indicates a location in the source code of the service for which errors are reported.", - "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "GoogleCloudDiscoveryengineV1ImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1ImportErrorConfig", "properties": { - "functionName": { - "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7113,223 +8591,223 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", - "properties": { - "targetSites": { - "description": "TargetSites created.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSite" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1Condition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1Condition", + "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", - "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", - "type": "boolean" + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", + "type": "string" }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata", "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", + "createTime": { + "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1Control": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "id": "GoogleCloudDiscoveryengineV1Control", + "GoogleCloudDiscoveryengineV1ImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1ImportUserEventsResponse", "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.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", - "description": "Defines a boost-type control" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1Condition" + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", "type": "string" }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Project": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1Project", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, "type": "string" }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", - "description": "Defines a redirect-type control." - }, - "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." - }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", - "items": { - "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" }, - "type": "array" + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", "type": "string" }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", - "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], "type": "string" }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "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" }, - "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse": { + "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse", "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "type": "string" + "$ref": "GoogleRpcStatus" }, "type": "array" + }, + "purgeSucceeded": { + "description": "Whether the completion suggestions were successfully purged.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -7338,26 +8816,28 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateEngineMetadata", + "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1CreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7372,164 +8852,181 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Schema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1Schema", + "properties": { + "jsonSchema": { + "description": "The JSON representation of the schema.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1DataStore", + "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { + "description": "Verification information for target sites in advanced site search.", + "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", "properties": { - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "siteVerificationState": { + "description": "Site verification state indicating the ownership and validity.", "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "SITE_VERIFICATION_STATE_UNSPECIFIED", + "VERIFIED", + "UNVERIFIED", + "EXEMPTED" ], "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." + "Defaults to VERIFIED.", + "Site ownership verified.", + "Site ownership pending verification or verification failed.", + "Site exempt from verification, e.g., a public website that opens to all." ], "type": "string" }, - "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", + "verifyTime": { + "description": "Latest site verification time.", "format": "google-datetime", - "readOnly": true, "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TargetSite": { + "description": "A target site for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1TargetSite", + "properties": { + "exactMatch": { + "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", + "type": "boolean" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", - "readOnly": true, - "type": "string" + "failureReason": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "description": "Output only. Failure reason.", + "readOnly": true }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "generatedUriPattern": { + "description": "Output only. This is system-generated based on the provided_uri_pattern.", + "readOnly": true, "type": "string" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." - }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", + "indexingStatus": { + "description": "Output only. Indexing status.", "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" + "INDEXING_STATUS_UNSPECIFIED", + "PENDING", + "FAILED", + "SUCCEEDED", + "DELETING" ], "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." + "Defaults to SUCCEEDED.", + "The target site is in the update queue and will be picked up by indexing pipeline.", + "The target site fails to be indexed.", + "The target site has been indexed.", + "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + "readOnly": true, + "type": "string" + }, + "providedUriPattern": { + "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "rootDomainUri": { + "description": "Output only. Root domain of the provided_uri_pattern.", + "readOnly": true, "type": "string" }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", - "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" - }, - "type": "array" + "siteVerificationInfo": { + "$ref": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", + "description": "Output only. Site ownership and validity verification status.", + "readOnly": true }, - "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)." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "type": { + "description": "The type of the target site, e.g., whether the site is to be included or excluded.", + "enum": [ + "TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" + ], + "enumDescriptions": [ + "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", + "Include the target site.", + "Exclude the target site." + ], "type": "string" }, "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "description": "Output only. The target site's last updated time.", "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", "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" + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", "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", + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7544,9 +9041,9 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7561,3081 +9058,3057 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1alphaAclConfig": { + "description": "Access Control Configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Identity provider config." }, "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" - }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" - }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", - "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaAlloyDbSource": { + "description": "AlloyDB source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaAlloyDbSource", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" + "clusterId": { + "description": "Required. The AlloyDB cluster to copy the data from with a length limit of 256 characters.", + "type": "string" }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "databaseId": { + "description": "Required. The AlloyDB database to copy the data from with a length limit of 256 characters.", + "type": "string" + }, + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the AlloyDB export to a specific Cloud Storage directory. Ensure that the AlloyDB service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", + "type": "string" + }, + "locationId": { + "description": "Required. The AlloyDB location to copy the data from with a length limit of 256 characters.", + "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.", + "type": "string" + }, + "tableId": { + "description": "Required. The AlloyDB table to copy the data from with a length limit of 256 characters.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswer": { + "description": "Defines an answer.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswer", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." + "answerSkippedReasons": { + "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", + "items": { + "enum": [ + "ANSWER_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_ANSWER_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION", + "NO_RELEVANT_CONTENT" + ], + "enumDescriptions": [ + "Default value. The answer skipped reason is not specified.", + "The adversarial query ignored case.", + "The non-answer seeking query ignored case.", + "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." + ], + "type": "string" + }, + "type": "array" + }, + "answerText": { + "description": "The textual answer.", + "type": "string" + }, + "citations": { + "description": "Citations.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" + }, + "type": "array" + }, + "completeTime": { + "description": "Output only. Answer completed timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Answer creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", + "type": "string" + }, + "queryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "description": "Query understanding information." + }, + "references": { + "description": "References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" + }, + "type": "array" + }, + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "state": { + "description": "The state of the answer generation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Answer generation is currently in progress.", + "Answer generation currently failed.", + "Answer generation has succeeded." + ], + "type": "string" }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "steps": { + "description": "Answer generation steps.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", + "endIndex": { + "description": "End of the attributed segment, exclusive.", + "format": "int64", + "type": "string" + }, + "sources": { + "description": "Citation sources for the attributed segment.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" }, "type": "array" }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", "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", + "referenceId": { + "description": "ID of the citation source.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1Engine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1Engine", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": { + "description": "Request message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + "answerGenerationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", + "description": "Answer generation specification." }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true + "asynchronousMode": { + "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "type": "boolean" }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "Required. Current user query." }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "queryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", + "description": "Query understanding specification." }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", - "items": { - "type": "string" - }, - "type": "array" + "relatedQuestionsSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", + "description": "Related questions specification." }, - "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", - "type": "string" + "safetySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", + "description": "Model specification." }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], - "type": "string" + "searchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", + "description": "Search specification." }, - "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "session": { + "description": "The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.", "type": "string" }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." - }, - "solutionType": { - "description": "Required. The solutions of the engine.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" }, - "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", - "format": "google-datetime", - "readOnly": true, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec": { + "description": "Answer generation specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." - }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "answerLanguageCode": { + "description": "Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" + }, + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", + "type": "boolean" + }, + "ignoreNonAnswerSeekingQuery": { + "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citation metadata in the answer. The default value is `false`.", + "type": "boolean" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", + "description": "Answer generation model specification." + }, + "promptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", + "description": "Answer generation prompt specification." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec": { + "description": "Answer Generation Model specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", - "type": "string" - }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", - "type": "string" - }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", - "type": "string" - }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "modelVersion": { + "description": "Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec": { + "description": "Answer generation prompt specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "preamble": { + "description": "Customized preamble.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec": { + "description": "Query understanding specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", - "type": "string" + "queryClassificationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "description": "Query classification specification." + }, + "queryRephraserSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "description": "Query rephraser specification." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec": { + "description": "Query classification specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", + "types": { + "description": "Enabled query classification types.", "items": { "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" ], "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." ], "type": "string" }, "type": "array" - }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec": { + "description": "Query rephraser specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", - "type": "string" + "disable": { + "description": "Disable query rephraser.", + "type": "boolean" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "maxRephraseSteps": { + "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec": { + "description": "Related questions specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", - "description": "The desired location of errors incurred during the Import." - }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "enable": { + "description": "Enable related questions feature if true.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": { + "description": "Safety specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, - "totalCount": { - "description": "Total count of entries that were processed.", - "format": "int64", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "enable": { + "description": "Enable the safety filtering on the answer response. It is false by default.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1ImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec": { + "description": "Search specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "searchParams": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", + "description": "Search parameters." }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "searchResultList": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", + "description": "Search result list." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams": { + "description": "Search parameters.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" + }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + }, + "type": "array" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + }, + "maxReturnResults": { + "description": "Number of search results to return. The default value is 10.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList": { + "description": "Search result list.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "searchResults": { + "description": "Search results.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult" }, "type": "array" - }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", - "type": "string" - }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult": { + "description": "Search result.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "description": "Chunk information." }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", + "description": "Unstructured document information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "content": { + "description": "Chunk textual content.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1ImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." + "document": { + "description": "Document resource name.", + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "documentContexts": { + "description": "List of document contexts.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" }, "type": "array" }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", + "extractiveAnswers": { + "description": "List of extractive answers.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" + }, + "type": "array" + }, + "extractiveSegments": { + "description": "List of extractive segments.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment" + }, + "type": "array" + }, + "title": { + "description": "Title.", "type": "string" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Project": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1Project", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext": { + "description": "Document context.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, + "content": { + "description": "Document content.", "type": "string" }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + "pageIdentifier": { + "description": "Page identifier.", "type": "string" - }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" - }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer": { + "description": "Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", - "type": "string" - }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", + "content": { + "description": "Extractive answer content.", "type": "string" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" - }, - "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", - "enum": [ - "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" - ], - "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." - ], + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", + "properties": { + "content": { + "description": "Extractive segment content.", "type": "string" }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse": { + "description": "Response message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "answer": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", + "description": "Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "answerQueryToken": { + "description": "A global unique ID used for logging.", "type": "string" + }, + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse": { - "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { + "description": "Query understanding information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "queryClassificationInfo": { + "description": "Query classification information.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" }, "type": "array" - }, - "purgeSucceeded": { - "description": "Whether the completion suggestions were successfully purged.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { + "description": "Query classification information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", - "type": "string" + "positive": { + "description": "Classification output.", + "type": "boolean" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "type": { + "description": "Query classification type.", + "enum": [ + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" + ], + "enumDescriptions": [ + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerReference": { + "description": "Reference.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", - "type": "string" + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "description": "Chunk information." }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", - "items": { - "type": "string" - }, - "type": "array" + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "description": "Unstructured document information." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "content": { + "description": "Chunk textual content.", "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "description": "Document metadata." + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { + "description": "Document metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" + "document": { + "description": "Document resource name.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" }, - "type": "array" + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Schema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1Schema", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", "properties": { - "jsonSchema": { - "description": "The JSON representation of the schema.", - "type": "string" + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" + }, + "type": "array" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "document": { + "description": "Document resource name.", "type": "string" }, - "structSchema": { + "structData": { "additionalProperties": { "description": "Properties of the object.", "type": "any" }, - "description": "The structured representation of the schema.", + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", "type": "object" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { - "description": "Verification information for target sites in advanced site search.", - "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", "properties": { - "siteVerificationState": { - "description": "Site verification state indicating the ownership and validity.", - "enum": [ - "SITE_VERIFICATION_STATE_UNSPECIFIED", - "VERIFIED", - "UNVERIFIED", - "EXEMPTED" - ], - "enumDescriptions": [ - "Defaults to VERIFIED.", - "Site ownership verified.", - "Site ownership pending verification or verification failed.", - "Site exempt from verification, e.g., a public website that opens to all." - ], + "content": { + "description": "Chunk textual content.", "type": "string" }, - "verifyTime": { - "description": "Latest site verification time.", - "format": "google-datetime", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSite": { - "description": "A target site for the SiteSearchEngine.", - "id": "GoogleCloudDiscoveryengineV1TargetSite", + "GoogleCloudDiscoveryengineV1alphaAnswerStep": { + "description": "Step information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", "properties": { - "exactMatch": { - "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", - "type": "boolean" - }, - "failureReason": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", - "description": "Output only. Failure reason.", - "readOnly": true + "actions": { + "description": "Actions.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + }, + "type": "array" }, - "generatedUriPattern": { - "description": "Output only. This is system-generated based on the provided_uri_pattern.", - "readOnly": true, + "description": { + "description": "The description of the step.", "type": "string" }, - "indexingStatus": { - "description": "Output only. Indexing status.", + "state": { + "description": "The state of the step.", "enum": [ - "INDEXING_STATUS_UNSPECIFIED", - "PENDING", + "STATE_UNSPECIFIED", + "IN_PROGRESS", "FAILED", - "SUCCEEDED", - "DELETING" + "SUCCEEDED" ], "enumDescriptions": [ - "Defaults to SUCCEEDED.", - "The target site is in the update queue and will be picked up by indexing pipeline.", - "The target site fails to be indexed.", - "The target site has been indexed.", - "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." + "Unknown.", + "Step is currently in progress.", + "Step currently failed.", + "Step has succeeded." ], - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", - "readOnly": true, - "type": "string" - }, - "providedUriPattern": { - "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", "type": "string" }, - "rootDomainUri": { - "description": "Output only. Root domain of the provided_uri_pattern.", - "readOnly": true, - "type": "string" - }, - "siteVerificationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", - "description": "Output only. Site ownership and validity verification status.", - "readOnly": true - }, - "type": { - "description": "The type of the target site, e.g., whether the site is to be included or excluded.", - "enum": [ - "TYPE_UNSPECIFIED", - "INCLUDE", - "EXCLUDE" - ], - "enumDescriptions": [ - "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", - "Include the target site.", - "Exclude the target site." - ], + "thought": { + "description": "The thought of the step.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { + "description": "Action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", + "properties": { + "observation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", + "description": "Observation." }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "searchAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "description": "Search action." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { + "description": "Observation.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "searchResults": { + "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", + "chunkInfo": { + "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" + }, + "type": "array" + }, + "document": { + "description": "Document resource name.", + "type": "string" + }, + "snippetInfo": { + "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" + }, + "type": "array" + }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "type": "object" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "content": { + "description": "Chunk textual content.", "type": "string" + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "snippet": { + "description": "Snippet content.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAclConfig": { - "description": "Access Control Configuration.", - "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", "properties": { - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Identity provider config." - }, - "name": { - "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "query": { + "description": "The query to search.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAlloyDbSource": { - "description": "AlloyDB source import data from.", - "id": "GoogleCloudDiscoveryengineV1alphaAlloyDbSource", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", "properties": { - "clusterId": { - "description": "Required. The AlloyDB cluster to copy the data from with a length limit of 256 characters.", - "type": "string" - }, - "databaseId": { - "description": "Required. The AlloyDB database to copy the data from with a length limit of 256 characters.", - "type": "string" - }, - "gcsStagingDir": { - "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the AlloyDB export to a specific Cloud Storage directory. Ensure that the AlloyDB service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", - "type": "string" - }, - "locationId": { - "description": "Required. The AlloyDB location to copy the data from with a length limit of 256 characters.", - "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.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "tableId": { - "description": "Required. The AlloyDB table to copy the data from with a length limit of 256 characters.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswer": { - "description": "Defines an answer.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswer", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest": { + "description": "Request message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest", "properties": { - "answerSkippedReasons": { - "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", - "items": { - "enum": [ - "ANSWER_SKIPPED_REASON_UNSPECIFIED", - "ADVERSARIAL_QUERY_IGNORED", - "NON_ANSWER_SEEKING_QUERY_IGNORED", - "OUT_OF_DOMAIN_QUERY_IGNORED", - "POTENTIAL_POLICY_VIOLATION", - "NO_RELEVANT_CONTENT" - ], - "enumDescriptions": [ - "Default value. The answer skipped reason is not specified.", - "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", - "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." - ], - "type": "string" - }, - "type": "array" - }, - "answerText": { - "description": "The textual answer.", - "type": "string" - }, - "citations": { - "description": "Citations.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" - }, - "type": "array" - }, - "completeTime": { - "description": "Output only. Answer completed timestamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "createTime": { - "description": "Output only. Answer creation timestamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", - "type": "string" - }, - "queryUnderstandingInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", - "description": "Query understanding information." - }, - "references": { - "description": "References.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" - }, - "type": "array" - }, - "relatedQuestions": { - "description": "Suggested related questions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "state": { - "description": "The state of the answer generation.", - "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS", - "FAILED", - "SUCCEEDED" - ], - "enumDescriptions": [ - "Unknown.", - "Answer generation is currently in progress.", - "Answer generation currently failed.", - "Answer generation has succeeded." - ], - "type": "string" - }, - "steps": { - "description": "Answer generation steps.", + "requests": { + "description": "Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" + "$ref": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { - "description": "Citation info for a segment.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", "properties": { - "endIndex": { - "description": "End of the attributed segment, exclusive.", - "format": "int64", - "type": "string" - }, - "sources": { - "description": "Citation sources for the attributed segment.", + "targetSites": { + "description": "TargetSites created.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" }, "type": "array" - }, - "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", - "format": "int64", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { - "description": "Citation source.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", - "properties": { - "referenceId": { - "description": "ID of the citation source.", - "type": "string" - } - }, + "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest": { + "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": { - "description": "Request message for ConversationalSearchService.AnswerQuery method.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest", + "GoogleCloudDiscoveryengineV1alphaBigQuerySource": { + "description": "BigQuery source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", "properties": { - "answerGenerationSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", - "description": "Answer generation specification." - }, - "asynchronousMode": { - "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", - "type": "boolean" - }, - "query": { - "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", - "description": "Required. Current user query." - }, - "queryUnderstandingSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", - "description": "Query understanding specification." - }, - "relatedQuestionsSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", - "description": "Related questions specification." + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical.", + "type": "string" }, - "safetySpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", - "description": "Model specification." + "datasetId": { + "description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", + "type": "string" }, - "searchSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", - "description": "Search specification." + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", + "type": "string" }, - "session": { - "description": "The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol `-` as session ID. A new ID will be automatically generated and assigned.", + "partitionDate": { + "$ref": "GoogleTypeDate", + "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.", "type": "string" }, - "userLabels": { + "tableId": { + "description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBigtableOptions": { + "description": "The Bigtable Options object that contains information to support the import.", + "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptions", + "properties": { + "families": { "additionalProperties": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily" }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "description": "The mapping from family names to an object that contains column families level information for the given column family. If a family is not present in this map it will be ignored.", "type": "object" }, - "userPseudoId": { - "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "keyFieldName": { + "description": "The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec": { - "description": "Answer generation specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", + "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn": { + "description": "The column of the Bigtable.", + "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn", "properties": { - "answerLanguageCode": { - "description": "Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", + "encoding": { + "description": "The encoding mode of the values when the type is not `STRING`. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", + "enum": [ + "ENCODING_UNSPECIFIED", + "TEXT", + "BINARY" + ], + "enumDescriptions": [ + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." + ], "type": "string" }, - "ignoreAdversarialQuery": { - "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", - "type": "boolean" - }, - "ignoreLowRelevantContent": { - "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", - "type": "boolean" - }, - "ignoreNonAnswerSeekingQuery": { - "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", - "type": "boolean" - }, - "includeCitations": { - "description": "Specifies whether to include citation metadata in the answer. The default value is `false`.", - "type": "boolean" + "fieldName": { + "description": "The field name to use for this column in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the qualifier bytes with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", + "type": "string" }, - "modelSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", - "description": "Answer generation model specification." + "qualifier": { + "description": "Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead.", + "format": "byte", + "type": "string" }, - "promptSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", - "description": "Answer generation prompt specification." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec": { - "description": "Answer Generation Model specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", - "properties": { - "modelVersion": { - "description": "Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.", + "type": { + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "INTEGER", + "VAR_INTEGER", + "BIG_NUMERIC", + "BOOLEAN", + "JSON" + ], + "enumDescriptions": [ + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec": { - "description": "Answer generation prompt specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", + "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily": { + "description": "The column family of the Bigtable.", + "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily", "properties": { - "preamble": { - "description": "Customized preamble.", + "columns": { + "description": "The list of objects that contains column level information for each column. If a column is not present in this list it will be ignored.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn" + }, + "type": "array" + }, + "encoding": { + "description": "The encoding mode of the values when the type is not STRING. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", + "enum": [ + "ENCODING_UNSPECIFIED", + "TEXT", + "BINARY" + ], + "enumDescriptions": [ + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." + ], + "type": "string" + }, + "fieldName": { + "description": "The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", + "type": "string" + }, + "type": { + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", + "enum": [ + "TYPE_UNSPECIFIED", + "STRING", + "NUMBER", + "INTEGER", + "VAR_INTEGER", + "BIG_NUMERIC", + "BOOLEAN", + "JSON" + ], + "enumDescriptions": [ + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec": { - "description": "Query understanding specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", + "GoogleCloudDiscoveryengineV1alphaBigtableSource": { + "description": "The Cloud Bigtable source for importing data.", + "id": "GoogleCloudDiscoveryengineV1alphaBigtableSource", "properties": { - "queryClassificationSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", - "description": "Query classification specification." + "bigtableOptions": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptions", + "description": "Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations." }, - "queryRephraserSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", - "description": "Query rephraser specification." + "instanceId": { + "description": "Required. The instance ID of the Cloud Bigtable that needs to be imported.", + "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.", + "type": "string" + }, + "tableId": { + "description": "Required. The table ID of the Cloud Bigtable that needs to be imported.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec": { - "description": "Query classification specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest": { + "description": "Request message for GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest", "properties": { - "types": { - "description": "Enabled query classification types.", + "answerCandidate": { + "description": "Answer candidate to check. Can have a maximum length of 1024 characters.", + "type": "string" + }, + "facts": { + "description": "List of facts for the grounding check. We support up to 200 facts.", "items": { - "enum": [ - "TYPE_UNSPECIFIED", - "ADVERSARIAL_QUERY", - "NON_ANSWER_SEEKING_QUERY" - ], - "enumDescriptions": [ - "Unspecified query classification type.", - "Adversarial query classification type.", - "Non-answer-seeking query classification type." - ], - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaGroundingFact" }, "type": "array" + }, + "groundingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", + "description": "Configuration of the grounding check." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec": { - "description": "Query rephraser specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse": { + "description": "Response message for the GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse", "properties": { - "disable": { - "description": "Disable query rephraser.", - "type": "boolean" + "citedChunks": { + "description": "List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFactChunk" + }, + "type": "array" + }, + "claims": { + "description": "Claim texts and citation info across all claims in the answer candidate.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim" + }, + "type": "array" }, - "maxRephraseSteps": { - "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", - "format": "int32", - "type": "integer" + "supportScore": { + "description": "The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec": { - "description": "Related questions specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", + "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim": { + "description": "Text and citation info for a claim in the answer candidate.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim", "properties": { - "enable": { - "description": "Enable related questions feature if true.", + "citationIndices": { + "description": "A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "claimText": { + "description": "Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.", + "type": "string" + }, + "endPos": { + "description": "Position indicating the end of the claim in the answer candidate, exclusive.", + "format": "int32", + "type": "integer" + }, + "groundingCheckRequired": { + "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" + }, + "startPos": { + "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": { - "description": "Safety specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", + "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec": { + "description": "Specification for the grounding check.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", "properties": { - "enable": { - "description": "Enable the safety filtering on the answer response. It is false by default.", - "type": "boolean" + "citationThreshold": { + "description": "The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec": { - "description": "Search specification.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", + "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest": { + "description": "Request for CheckRequirement method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest", "properties": { - "searchParams": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", - "description": "Search parameters." + "requirementType": { + "description": "The type specifying the requirement to check. The supported types are: * `discoveryengine.googleapis.com/media_recs/general/all/warning` * `discoveryengine.googleapis.com/media_recs/oyml/cvr/warning` * `discoveryengine.googleapis.com/media_recs/rfy/cvr/warning` * `discoveryengine.googleapis.com/media_recs/mlt/cvr/warning` * `discoveryengine.googleapis.com/media_recs/mp/cvr/warning` * `discoveryengine.googleapis.com/media_recs/oyml/wdps/warning` * `discoveryengine.googleapis.com/media_recs/rfy/wdps/warning` * `discoveryengine.googleapis.com/media_recs/mlt/wdps/warning`", + "type": "string" }, - "searchResultList": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", - "description": "Search result list." + "resources": { + "description": "The type needed for the monitored resources: * `discoveryengine.googleapis.com/Branch`. * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id` * `branch`_`id` * `discoveryengine.googleapis.com/DataStore` * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id`", + "items": { + "$ref": "GoogleApiMonitoredResource" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams": { - "description": "Search parameters.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", + "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse": { + "description": "Response for the CheckRequirement method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse", "properties": { - "boostSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", - "description": "Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" - }, - "customFineTuningSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", - "description": "Custom fine tuning configs." - }, - "dataStoreSpecs": { - "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "metricResults": { + "description": "Metric results.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult" }, "type": "array" }, - "filter": { - "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", + "oldestMetricTimestamp": { + "description": "Timestamp of the oldest calculated metric (i.e. the most stale metric). Indicates that the `requirement_result` may not accurately reflect any Event and Product Catalog updates performed after this time.", + "format": "google-datetime", "type": "string" }, - "maxReturnResults": { - "description": "Number of search results to return. The default value is 10.", - "format": "int32", - "type": "integer" + "requirement": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirement", + "description": "Requirement definition." }, - "orderBy": { - "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", - "type": "string" + "requirementCondition": { + "$ref": "GoogleTypeExpr", + "description": "The condition for evaluating the requirement result." }, - "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "requirementResult": { + "description": "Requirement result, e.g. pass or fail.", "enum": [ - "SEARCH_RESULT_MODE_UNSPECIFIED", - "DOCUMENTS", - "CHUNKS" + "UNKNOWN", + "SUCCESS", + "FAILURE", + "WARNING" ], "enumDescriptions": [ - "Default value.", - "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + "The requirement is unknown.", + "The requirement check is passed.", + "The requirement check fails to meet at least one blocking threshold.", + "The requirement check fails at least one warning threshold, but passes all blocking thresholds." ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList": { - "description": "Search result list.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", - "properties": { - "searchResults": { - "description": "Search results.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult": { - "description": "Search result.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult", + "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult": { + "description": "Metric result. The metric are in the requirement_condition.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult", "properties": { - "chunkInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", - "description": "Chunk information." + "metricType": { + "description": "Type identifier of the metric corresponding to this query result.", + "type": "string" }, - "unstructuredDocumentInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", - "description": "Unstructured document information." + "name": { + "description": "This metric query name is mapping to variables in the requirement_condition.", + "type": "string" + }, + "timestamp": { + "description": "Time corresponding to when this metric value was calculated.", + "format": "google-datetime", + "type": "string" + }, + "unit": { + "description": "The unit in which this metric is reported. Follows [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard.", + "type": "string" + }, + "value": { + "$ref": "GoogleMonitoringV3TypedValue", + "description": "Value of the metric query." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo": { - "description": "Chunk information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "GoogleCloudDiscoveryengineV1alphaChunk": { + "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", + "id": "GoogleCloudDiscoveryengineV1alphaChunk", "properties": { - "chunk": { - "description": "Chunk resource name.", - "type": "string" + "chunkMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata", + "description": "Output only. Metadata of the current chunk.", + "readOnly": true }, "content": { - "description": "Chunk textual content.", + "description": "Content is a string from a document (parsed content).", + "type": "string" + }, + "derivedStructData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", + "readOnly": true, + "type": "object" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", + "description": "Metadata of the document from the current chunk." + }, + "id": { + "description": "Unique chunk ID of the current chunk.", + "type": "string" + }, + "name": { + "description": "The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "pageSpan": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunkPageSpan", + "description": "Page span of the chunk." + }, + "relevanceScore": { + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", + "format": "double", + "readOnly": true, + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo": { - "description": "Unstructured document information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", + "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata": { + "description": "Metadata of the current chunk. This field is only populated on SearchService.Search API.", + "id": "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata", "properties": { - "document": { - "description": "Document resource name.", - "type": "string" - }, - "documentContexts": { - "description": "List of document contexts.", + "nextChunks": { + "description": "The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" + "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" }, "type": "array" }, - "extractiveAnswers": { - "description": "List of extractive answers.", + "previousChunks": { + "description": "The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" + "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" }, "type": "array" - }, - "extractiveSegments": { - "description": "List of extractive segments.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata": { + "description": "Document metadata contains the information of the document of the current chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", + "properties": { + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" }, - "type": "array" + "description": "Data representation. The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "type": "object" }, "title": { - "description": "Title.", + "description": "Title of the document.", "type": "string" }, "uri": { - "description": "URI for the document.", + "description": "Uri of the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext": { - "description": "Document context.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", + "GoogleCloudDiscoveryengineV1alphaChunkPageSpan": { + "description": "Page span of the chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaChunkPageSpan", "properties": { - "content": { - "description": "Document content.", - "type": "string" + "pageEnd": { + "description": "The end page of the chunk.", + "format": "int32", + "type": "integer" }, - "pageIdentifier": { - "description": "Page identifier.", - "type": "string" + "pageStart": { + "description": "The start page of the chunk.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer": { - "description": "Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer", + "GoogleCloudDiscoveryengineV1alphaCloudSqlSource": { + "description": "Cloud SQL source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaCloudSqlSource", "properties": { - "content": { - "description": "Extractive answer content.", + "databaseId": { + "description": "Required. The Cloud SQL database to copy the data from with a length limit of 256 characters.", "type": "string" }, - "pageIdentifier": { - "description": "Page identifier.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { - "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", - "properties": { - "content": { - "description": "Extractive segment content.", + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Ensure that the Cloud SQL service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", "type": "string" }, - "pageIdentifier": { - "description": "Page identifier.", + "instanceId": { + "description": "Required. The Cloud SQL instance to copy the data from with a length limit of 256 characters.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse": { - "description": "Response message for ConversationalSearchService.AnswerQuery method.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse", - "properties": { - "answer": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", - "description": "Answer resource object. If AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." }, - "answerQueryToken": { - "description": "A global unique ID used for logging.", + "offload": { + "description": "Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless).", + "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.", "type": "string" }, - "session": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSession", - "description": "Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request." + "tableId": { + "description": "Required. The Cloud SQL table to copy the data from with a length limit of 256 characters.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { - "description": "Query understanding information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse": { + "description": "Response message for CompletionService.CompleteQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse", "properties": { - "queryClassificationInfo": { - "description": "Query classification information.", + "querySuggestions": { + "description": "Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" + "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion" }, "type": "array" + }, + "tailMatchTriggered": { + "description": "True if the returned suggestions are all tail suggestions. For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { - "description": "Query classification information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", + "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion": { + "description": "Suggestions as search queries.", + "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion", "properties": { - "positive": { - "description": "Classification output.", - "type": "boolean" + "completableFieldPaths": { + "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", + "items": { + "type": "string" + }, + "type": "array" }, - "type": { - "description": "Query classification type.", - "enum": [ - "TYPE_UNSPECIFIED", - "ADVERSARIAL_QUERY", - "NON_ANSWER_SEEKING_QUERY" - ], - "enumDescriptions": [ - "Unspecified query classification type.", - "Adversarial query classification type.", - "Non-answer-seeking query classification type." - ], + "suggestion": { + "description": "The suggestion for the query.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReference": { - "description": "Reference.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", + "GoogleCloudDiscoveryengineV1alphaCompletionInfo": { + "description": "Detailed completion information including completion attribution token and clicked completion info.", + "id": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", "properties": { - "chunkInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", - "description": "Chunk information." + "selectedPosition": { + "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0.", + "format": "int32", + "type": "integer" }, - "unstructuredDocumentInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", - "description": "Unstructured document information." + "selectedSuggestion": { + "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { - "description": "Chunk information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion": { + "description": "Autocomplete suggestions that are imported from Customer.", + "id": "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion", "properties": { - "chunk": { - "description": "Chunk resource name.", - "type": "string" + "alternativePhrases": { + "description": "Alternative matching phrases for this suggestion.", + "items": { + "type": "string" + }, + "type": "array" }, - "content": { - "description": "Chunk textual content.", + "frequency": { + "description": "Frequency of this suggestion. Will be used to rank suggestions when score is not available.", + "format": "int64", "type": "string" }, - "documentMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", - "description": "Document metadata." - }, - "relevanceScore": { - "description": "Relevance score.", - "format": "float", + "globalScore": { + "description": "Global score of this suggestion. Control how this suggestion would be scored / ranked.", + "format": "double", "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { - "description": "Document metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", - "properties": { - "document": { - "description": "Document resource name.", - "type": "string" }, - "pageIdentifier": { - "description": "Page identifier.", + "groupId": { + "description": "If two suggestions have the same groupId, they will not be returned together. Instead the one ranked higher will be returned. This can be used to deduplicate semantically identical suggestions.", "type": "string" }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", - "type": "object" + "groupScore": { + "description": "The score of this suggestion within its group.", + "format": "double", + "type": "number" }, - "title": { - "description": "Title.", + "languageCode": { + "description": "BCP-47 language code of this suggestion.", "type": "string" }, - "uri": { - "description": "URI for the document.", + "suggestion": { + "description": "Required. The suggestion text.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { - "description": "Unstructured document information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "GoogleCloudDiscoveryengineV1alphaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1alphaCondition", "properties": { - "chunkContents": { - "description": "List of cited chunk contents derived from document content.", + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" }, "type": "array" }, - "document": { - "description": "Document resource name.", - "type": "string" - }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" }, - "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", - "type": "object" - }, - "title": { - "description": "Title.", - "type": "string" + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" }, - "uri": { - "description": "URI for the document.", + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { - "description": "Chunk content.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", + "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", "properties": { - "content": { - "description": "Chunk textual content.", + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", "type": "string" }, - "pageIdentifier": { - "description": "Page identifier.", + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStep": { - "description": "Step information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", + "GoogleCloudDiscoveryengineV1alphaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { - "actions": { - "description": "Actions.", + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + "type": "string" }, + "readOnly": true, "type": "array" }, - "description": { - "description": "The description of the step.", + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" }, - "state": { - "description": "The state of the step.", + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS", - "FAILED", - "SUCCEEDED" + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" ], "enumDescriptions": [ - "Unknown.", - "Step is currently in progress.", - "Step currently failed.", - "Step has succeeded." + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." ], "type": "string" }, - "thought": { - "description": "The thought of the step.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { - "description": "Action.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", - "properties": { - "observation": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", - "description": "Observation." + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." }, - "searchAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", - "description": "Search action." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { - "description": "Observation.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", - "properties": { - "searchResults": { - "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", + "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", "properties": { - "chunkInfo": { - "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" - }, - "type": "array" - }, - "document": { - "description": "Document resource name.", - "type": "string" - }, - "snippetInfo": { - "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" - }, - "type": "array" - }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", - "type": "object" + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" }, - "title": { - "description": "Title.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "uri": { - "description": "URI for the document.", + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { - "description": "Chunk information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", + "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", "properties": { - "chunk": { - "description": "Chunk resource name.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "content": { - "description": "Chunk textual content.", + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" - }, - "relevanceScore": { - "description": "Relevance score.", - "format": "float", - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { - "description": "Snippet information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", + "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", "properties": { - "snippet": { - "description": "Snippet content.", - "type": "string" - }, - "snippetStatus": { - "description": "Status of the snippet defined by the search team.", + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { - "description": "Search action.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", "properties": { - "query": { - "description": "The query to search.", - "type": "string" + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaConversation": { + "description": "External conversation proto definition.", + "id": "GoogleCloudDiscoveryengineV1alphaConversation", "properties": { - "createTime": { - "description": "Operation create time.", + "endTime": { + "description": "Output only. The time the conversation finished.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "messages": { + "description": "Conversation messages.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConversationMessage" + }, + "type": "array" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.", + "type": "string" + }, + "startTime": { + "description": "Output only. The time the conversation started.", "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the Conversation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "COMPLETED" + ], + "enumDescriptions": [ + "Unknown.", + "Conversation is currently open.", + "Conversation has been completed." + ], + "type": "string" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest": { - "description": "Request message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest", + "GoogleCloudDiscoveryengineV1alphaConversationContext": { + "description": "Defines context of the conversation", + "id": "GoogleCloudDiscoveryengineV1alphaConversationContext", "properties": { - "requests": { - "description": "Required. The request message specifying the resources to create. A maximum of 20 TargetSites can be created in a batch.", + "activeDocument": { + "description": "The current active document the user opened. It contains the document resource reference.", + "type": "string" + }, + "contextDocuments": { + "description": "The current list of documents the user is seeing. It contains the document resource references.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest" + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1alphaConversationMessage": { + "description": "Defines a conversation message.", + "id": "GoogleCloudDiscoveryengineV1alphaConversationMessage", "properties": { - "targetSites": { - "description": "TargetSites created.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" - }, - "type": "array" + "createTime": { + "description": "Output only. Message creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "reply": { + "$ref": "GoogleCloudDiscoveryengineV1alphaReply", + "description": "Search reply." + }, + "userInput": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTextInput", + "description": "User text input." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest": { - "description": "Request message for SiteSearchEngineService.BatchVerifyTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaBigQuerySource": { - "description": "BigQuery source import data from.", - "id": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest": { + "description": "Request message for ConversationalSearchService.ConverseConversation method.", + "id": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest", "properties": { - "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical.", - "type": "string" + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" }, - "datasetId": { - "description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", - "type": "string" + "conversation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", + "description": "The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session." }, - "gcsStagingDir": { - "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" }, - "partitionDate": { - "$ref": "GoogleTypeDate", - "description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format." + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTextInput", + "description": "Required. Current user input." }, - "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.", - "type": "string" + "safeSearch": { + "description": "Whether to turn on safe search.", + "type": "boolean" }, - "tableId": { - "description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", + "servingConfig": { + "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", "type": "string" + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "description": "A specification for configuring the summary returned in the response." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBigtableOptions": { - "description": "The Bigtable Options object that contains information to support the import.", - "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptions", + "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse": { + "description": "Response message for ConversationalSearchService.ConverseConversation method.", + "id": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse", "properties": { - "families": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily" + "conversation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", + "description": "Updated conversation including the answer." + }, + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" }, - "description": "The mapping from family names to an object that contains column families level information for the given column family. If a family is not present in this map it will be ignored.", - "type": "object" + "type": "array" }, - "keyFieldName": { - "description": "The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`.", - "type": "string" + "reply": { + "$ref": "GoogleCloudDiscoveryengineV1alphaReply", + "description": "Answer to the current query." + }, + "searchResults": { + "description": "Search Results.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn": { - "description": "The column of the Bigtable.", - "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn", + "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", "properties": { - "encoding": { - "description": "The encoding mode of the values when the type is not `STRING`. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", - "enum": [ - "ENCODING_UNSPECIFIED", - "TEXT", - "BINARY" - ], - "enumDescriptions": [ - "The encoding is unspecified.", - "Text encoding.", - "Binary encoding." - ], + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "fieldName": { - "description": "The field name to use for this column in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the qualifier bytes with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "qualifier": { - "description": "Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead.", - "format": "byte", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "type": { - "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", - "enum": [ - "TYPE_UNSPECIFIED", - "STRING", - "NUMBER", - "INTEGER", - "VAR_INTEGER", - "BIG_NUMERIC", - "BOOLEAN", - "JSON" - ], - "enumDescriptions": [ - "The type is unspecified.", - "String type.", - "Numerical type.", - "Integer type.", - "Variable length integer type.", - "BigDecimal type.", - "Boolean type.", - "JSON type." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily": { - "description": "The column family of the Bigtable.", - "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily", + "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", "properties": { - "columns": { - "description": "The list of objects that contains column level information for each column. If a column is not present in this list it will be ignored.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn" - }, - "type": "array" - }, - "encoding": { - "description": "The encoding mode of the values when the type is not STRING. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", - "enum": [ - "ENCODING_UNSPECIFIED", - "TEXT", - "BINARY" - ], - "enumDescriptions": [ - "The encoding is unspecified.", - "Text encoding.", - "Binary encoding." - ], - "type": "string" - }, - "fieldName": { - "description": "The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "type": { - "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", - "enum": [ - "TYPE_UNSPECIFIED", - "STRING", - "NUMBER", - "INTEGER", - "VAR_INTEGER", - "BIG_NUMERIC", - "BOOLEAN", - "JSON" - ], - "enumDescriptions": [ - "The type is unspecified.", - "String type.", - "Numerical type.", - "Integer type.", - "Variable length integer type.", - "BigDecimal type.", - "Boolean type.", - "JSON type." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBigtableSource": { - "description": "The Cloud Bigtable source for importing data.", - "id": "GoogleCloudDiscoveryengineV1alphaBigtableSource", + "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", "properties": { - "bigtableOptions": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableOptions", - "description": "Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations." - }, - "instanceId": { - "description": "Required. The instance ID of the Cloud Bigtable that needs to be imported.", - "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.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "tableId": { - "description": "Required. The table ID of the Cloud Bigtable that needs to be imported.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest": { - "description": "Request message for GroundedGenerationService.CheckGrounding method.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest", + "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest": { + "description": "Request message for SiteSearchEngineService.CreateTargetSite method.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest", "properties": { - "answerCandidate": { - "description": "Answer candidate to check. Can have a maximum length of 1024 characters.", + "parent": { + "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", "type": "string" }, - "facts": { - "description": "List of facts for the grounding check. We support up to 200 facts.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGroundingFact" - }, - "type": "array" - }, - "groundingSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", - "description": "Configuration of the grounding check." - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", - "type": "object" + "targetSite": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite", + "description": "Required. The TargetSite to create." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse": { - "description": "Response message for the GroundedGenerationService.CheckGrounding method.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse", + "GoogleCloudDiscoveryengineV1alphaCustomAttribute": { + "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomAttribute", "properties": { - "citedChunks": { - "description": "List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.", + "numbers": { + "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFactChunk" + "format": "double", + "type": "number" }, "type": "array" }, - "claims": { - "description": "Claim texts and citation info across all claims in the answer candidate.", + "text": { + "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim" + "type": "string" }, "type": "array" - }, - "supportScore": { - "description": "The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.", - "format": "float", - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim": { - "description": "Text and citation info for a claim in the answer candidate.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim", + "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec": { + "description": "Defines custom fine tuning spec.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", "properties": { - "citationIndices": { - "description": "A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.", - "items": { - "format": "int32", - "type": "integer" + "enableSearchAdaptor": { + "description": "Whether or not to enable and include custom fine tuned search adaptor model.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", + "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" }, - "type": "array" + "description": "The metrics of the trained model.", + "type": "object" }, - "claimText": { - "description": "Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.", + "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" + ], + "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." + ], "type": "string" }, - "endPos": { - "description": "Position indicating the end of the claim in the answer candidate, exclusive.", - "format": "int32", - "type": "integer" + "modelVersion": { + "description": "The version of the model.", + "format": "int64", + "type": "string" }, - "groundingCheckRequired": { - "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" + "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" }, - "startPos": { - "description": "Position indicating the start of the claim in the answer candidate, measured in bytes.", - "format": "int32", - "type": "integer" + "trainingStartTime": { + "description": "Timestamp the model training was initiated.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec": { - "description": "Specification for the grounding check.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", + "GoogleCloudDiscoveryengineV1alphaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaDataStore", "properties": { - "citationThreshold": { - "description": "The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.", - "format": "double", - "type": "number" + "aclEnabled": { + "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "type": "boolean" + }, + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Output only. Data store level identity provider config.", + "readOnly": true + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "languageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", + "description": "Language info for DataStore." + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "type": "array" + }, + "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest": { - "description": "Request for CheckRequirement method.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest", + "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", "properties": { - "requirementType": { - "description": "The type specifying the requirement to check. The supported types are: * `discoveryengine.googleapis.com/media_recs/general/all/warning` * `discoveryengine.googleapis.com/media_recs/oyml/cvr/warning` * `discoveryengine.googleapis.com/media_recs/rfy/cvr/warning` * `discoveryengine.googleapis.com/media_recs/mlt/cvr/warning` * `discoveryengine.googleapis.com/media_recs/mp/cvr/warning` * `discoveryengine.googleapis.com/media_recs/oyml/wdps/warning` * `discoveryengine.googleapis.com/media_recs/rfy/wdps/warning` * `discoveryengine.googleapis.com/media_recs/mlt/wdps/warning`", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "resources": { - "description": "The type needed for the monitored resources: * `discoveryengine.googleapis.com/Branch`. * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id` * `branch`_`id` * `discoveryengine.googleapis.com/DataStore` * The labels needed for this resource: * `project`_`number` * `location`_`id` * `collection`_`id` * `datastore`_`id`", - "items": { - "$ref": "GoogleApiMonitoredResource" - }, - "type": "array" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse": { - "description": "Response for the CheckRequirement method.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse", + "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", "properties": { - "metricResults": { - "description": "Metric results.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult" - }, - "type": "array" - }, - "oldestMetricTimestamp": { - "description": "Timestamp of the oldest calculated metric (i.e. the most stale metric). Indicates that the `requirement_result` may not accurately reflect any Event and Product Catalog updates performed after this time.", + "createTime": { + "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "requirement": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRequirement", - "description": "Requirement definition." - }, - "requirementCondition": { - "$ref": "GoogleTypeExpr", - "description": "The condition for evaluating the requirement result." - }, - "requirementResult": { - "description": "Requirement result, e.g. pass or fail.", - "enum": [ - "UNKNOWN", - "SUCCESS", - "FAILURE", - "WARNING" - ], - "enumDescriptions": [ - "The requirement is unknown.", - "The requirement check is passed.", - "The requirement check fails to meet at least one blocking threshold.", - "The requirement check fails at least one warning threshold, but passes all blocking thresholds." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult": { - "description": "Metric result. The metric are in the requirement_condition.", - "id": "GoogleCloudDiscoveryengineV1alphaCheckRequirementResponseMetricQueryResult", + "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", "properties": { - "metricType": { - "description": "Type identifier of the metric corresponding to this query result.", - "type": "string" - }, - "name": { - "description": "This metric query name is mapping to variables in the requirement_condition.", - "type": "string" - }, - "timestamp": { - "description": "Time corresponding to when this metric value was calculated.", + "createTime": { + "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "unit": { - "description": "The unit in which this metric is reported. Follows [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "value": { - "$ref": "GoogleMonitoringV3TypedValue", - "description": "Value of the metric query." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaChunk": { - "description": "Chunk captures all raw metadata information of items to be recommended or searched in the chunk mode.", - "id": "GoogleCloudDiscoveryengineV1alphaChunk", + "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", "properties": { - "chunkMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata", - "description": "Output only. Metadata of the current chunk.", - "readOnly": true - }, - "content": { - "description": "Content is a string from a document (parsed content).", - "type": "string" - }, - "derivedStructData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", - "readOnly": true, - "type": "object" - }, - "documentMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", - "description": "Metadata of the document from the current chunk." - }, - "id": { - "description": "Unique chunk ID of the current chunk.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "name": { - "description": "The full resource name of the chunk. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "pageSpan": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunkPageSpan", - "description": "Page span of the chunk." - }, - "relevanceScore": { - "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", - "format": "double", - "readOnly": true, - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata": { - "description": "Metadata of the current chunk. This field is only populated on SearchService.Search API.", - "id": "GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", "properties": { - "nextChunks": { - "description": "The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" - }, - "type": "array" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "previousChunks": { - "description": "The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" - }, - "type": "array" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata": { - "description": "Document metadata contains the information of the document of the current chunk.", - "id": "GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest": { + "description": "Request message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocument": { + "description": "Document captures all raw metadata information of items to be recommended or searched.", + "id": "GoogleCloudDiscoveryengineV1alphaDocument", "properties": { - "structData": { + "aclInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", + "description": "Access control information for the document." + }, + "content": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentContent", + "description": "The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store." + }, + "derivedStructData": { "additionalProperties": { "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", + "readOnly": true, "type": "object" }, - "title": { - "description": "Title of the document.", + "id": { + "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, - "uri": { - "description": "Uri of the document.", + "indexTime": { + "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", + "format": "google-datetime", + "readOnly": true, "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaChunkPageSpan": { - "description": "Page span of the chunk.", - "id": "GoogleCloudDiscoveryengineV1alphaChunkPageSpan", - "properties": { - "pageEnd": { - "description": "The end page of the chunk.", - "format": "int32", - "type": "integer" }, - "pageStart": { - "description": "The start page of the chunk.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaCloudSqlSource": { - "description": "Cloud SQL source import data from.", - "id": "GoogleCloudDiscoveryengineV1alphaCloudSqlSource", - "properties": { - "databaseId": { - "description": "Required. The Cloud SQL database to copy the data from with a length limit of 256 characters.", + "jsonData": { + "description": "The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", "type": "string" }, - "gcsStagingDir": { - "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Ensure that the Cloud SQL service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", + "name": { + "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, - "instanceId": { - "description": "Required. The Cloud SQL instance to copy the data from with a length limit of 256 characters.", + "parentDocumentId": { + "description": "The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", "type": "string" }, - "offload": { - "description": "Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless).", - "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.", + "schemaId": { + "description": "The identifier of the schema located in the same data store.", "type": "string" }, - "tableId": { - "description": "Required. The Cloud SQL table to copy the data from with a length limit of 256 characters.", - "type": "string" + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse": { - "description": "Response message for CompletionService.CompleteQuery method.", - "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse", + "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo": { + "description": "ACL Information of the Document.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", "properties": { - "querySuggestions": { - "description": "Results of the matched query suggestions. The result list is ordered and the first result is a top suggestion.", + "readers": { + "description": "Readers of the document.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion" + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction" }, "type": "array" - }, - "tailMatchTriggered": { - "description": "True if the returned suggestions are all tail suggestions. For tail matching to be triggered, include_tail_suggestions in the request must be true and there must be no suggestions that match the full query.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion": { - "description": "Suggestions as search queries.", - "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion", + "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction": { + "description": "AclRestriction to model complex inheritance restrictions. Example: Modeling a \"Both Permit\" inheritance, where to access a child document, user needs to have access to parent document. Document Hierarchy - Space_S --\u003e Page_P. Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ] } ] } } Page_P ACL Restriction. { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_2\" }, { \"group_id\": \"group_3\" }, { \"user_id\": \"user_2\" } ], }, { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ], } ] } }", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction", "properties": { - "completableFieldPaths": { - "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", + "principals": { + "description": "List of principals.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaPrincipal" }, "type": "array" - }, - "suggestion": { - "description": "The suggestion for the query.", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompletionInfo": { - "description": "Detailed completion information including completion attribution token and clicked completion info.", - "id": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "GoogleCloudDiscoveryengineV1alphaDocumentContent": { + "description": "Unstructured data linked to this document.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentContent", "properties": { - "selectedPosition": { - "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0.", - "format": "int32", - "type": "integer" + "mimeType": { + "description": "The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.", + "type": "string" }, - "selectedSuggestion": { - "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion.", + "rawBytes": { + "description": "The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*\u0026()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.", + "format": "byte", + "type": "string" + }, + "uri": { + "description": "The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 200 MB for other formats.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion": { - "description": "Autocomplete suggestions that are imported from Customer.", - "id": "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion", + "GoogleCloudDiscoveryengineV1alphaDocumentInfo": { + "description": "Detailed document information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", "properties": { - "alternativePhrases": { - "description": "Alternative matching phrases for this suggestion.", - "items": { - "type": "string" - }, - "type": "array" - }, - "frequency": { - "description": "Frequency of this suggestion. Will be used to rank suggestions when score is not available.", - "format": "int64", + "id": { + "description": "The Document resource ID.", "type": "string" }, - "globalScore": { - "description": "Global score of this suggestion. Control how this suggestion would be scored / ranked.", - "format": "double", - "type": "number" - }, - "groupId": { - "description": "If two suggestions have the same groupId, they will not be returned together. Instead the one ranked higher will be returned. This can be used to deduplicate semantically identical suggestions.", + "name": { + "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", "type": "string" }, - "groupScore": { - "description": "The score of this suggestion within its group.", - "format": "double", - "type": "number" + "promotionIds": { + "description": "The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.", + "items": { + "type": "string" + }, + "type": "array" }, - "languageCode": { - "description": "BCP-47 language code of this suggestion.", - "type": "string" + "quantity": { + "description": "Quantity of the Document associated with the user event. Defaults to 1. For example, this field is 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase`", + "format": "int32", + "type": "integer" }, - "suggestion": { - "description": "Required. The suggestion text.", + "uri": { + "description": "The Document URI - only allowed for website data stores.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCondition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" - }, - "type": "array" + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "type": "array" + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", - "type": "boolean" - }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", - "type": "string" + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", - "format": "google-datetime", - "type": "string" + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", - "format": "google-datetime", - "type": "string" + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControl": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "id": "GoogleCloudDiscoveryengineV1alphaControl", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", "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.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", - "description": "Defines a boost-type control" - }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" - }, - "type": "array" - }, - "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" - }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" - }, - "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", - "type": "string" - }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", - "description": "Defines a redirect-type control." - }, - "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", "items": { - "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], "type": "string" }, "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "GoogleCloudDiscoveryengineV1alphaDoubleList": { + "description": "Double list.", + "id": "GoogleCloudDiscoveryengineV1alphaDoubleList", "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" - }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" + "values": { + "description": "Double values.", + "items": { + "format": "double", + "type": "number" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig": { + "description": "Defines embedding config, used for bring your own embeddings feature.", + "id": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "fieldPath": { + "description": "Full field path in the schema mapped as embedding field.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "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" }, - "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", - "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", - "items": { - "type": "string" - }, - "type": "array" - } - }, + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest": { + "description": "Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConversation": { - "description": "External conversation proto definition.", - "id": "GoogleCloudDiscoveryengineV1alphaConversation", + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngine", "properties": { - "endTime": { - "description": "Output only. The time the conversation finished.", + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", "format": "google-datetime", "readOnly": true, "type": "string" }, - "messages": { - "description": "Conversation messages.", + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConversationMessage" + "type": "string" }, "type": "array" }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.", + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, - "startTime": { - "description": "Output only. The time the conversation started.", - "format": "google-datetime", - "readOnly": true, + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], "type": "string" }, - "state": { - "description": "The state of the Conversation.", + "mediaRecommendationEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "recommendationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "readOnly": true + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "similarDocumentsConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "description": "Additional config specs for a `similar-items` engine." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS", - "COMPLETED" + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" ], "enumDescriptions": [ - "Unknown.", - "Conversation is currently open.", - "Conversation has been completed." + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." ], "type": "string" }, - "userPseudoId": { - "description": "A unique identifier for tracking users.", + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConversationContext": { - "description": "Defines context of the conversation", - "id": "GoogleCloudDiscoveryengineV1alphaConversationContext", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", "properties": { - "activeDocument": { - "description": "The current active document the user opened. It contains the document resource reference.", - "type": "string" + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "contextDocuments": { - "description": "The current list of documents the user is seeing. It contains the document resource references.", - "items": { - "type": "string" - }, - "type": "array" + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConversationMessage": { - "description": "Defines a conversation message.", - "id": "GoogleCloudDiscoveryengineV1alphaConversationMessage", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", "properties": { - "createTime": { - "description": "Output only. Message creation timestamp.", - "format": "google-datetime", - "readOnly": true, + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", "type": "string" }, - "reply": { - "$ref": "GoogleCloudDiscoveryengineV1alphaReply", - "description": "Search reply." + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" }, - "userInput": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTextInput", - "description": "User text input." + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest": { - "description": "Request message for ConversationalSearchService.ConverseConversation method.", - "id": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", "properties": { - "boostSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", - "description": "Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" - }, - "conversation": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", - "description": "The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session." - }, - "filter": { - "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", "type": "string" - }, - "query": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTextInput", - "description": "Required. Current user input." - }, - "safeSearch": { - "description": "Whether to turn on safe search.", - "type": "boolean" - }, - "servingConfig": { - "description": "The resource name of the Serving Config to use. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not set, the default serving config will be used.", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "properties": { + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" - }, - "summarySpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", - "description": "A specification for configuring the summary returned in the response." - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse": { - "description": "Response message for ConversationalSearchService.ConverseConversation method.", - "id": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse", + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { + "description": "Additional config specs for a Media Recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", "properties": { - "conversation": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConversation", - "description": "Updated conversation including the answer." + "optimizationObjective": { + "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", + "type": "string" }, - "relatedQuestions": { - "description": "Suggested related questions.", - "items": { - "type": "string" - }, - "type": "array" + "optimizationObjectiveConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." }, - "reply": { - "$ref": "GoogleCloudDiscoveryengineV1alphaReply", - "description": "Answer to the current query." + "trainingState": { + "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The engine training is paused.", + "The engine is training." + ], + "type": "string" }, - "searchResults": { - "description": "Search Results.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" - }, - "type": "array" + "type": { + "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { + "description": "Custom threshold for `cvr` optimization_objective.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "targetField": { + "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "targetFieldValueFloat": { + "description": "Required. The threshold to be applied to the target (e.g., 0.5).", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { + "description": "Additional information of a recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "dataState": { + "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The engine has sufficient training data.", + "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The engine is not serving.", + "The engine is serving and can be queried.", + "The engine is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { + "description": "Additional config specs for a `similar-items` engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { + "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", "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" }, - "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest": { - "description": "Request message for SiteSearchEngineService.CreateTargetSite method.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest", + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest": { + "description": "Request message for EstimateBillingService.EstimateDataSize method", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest", "properties": { - "parent": { - "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", - "type": "string" + "fileDataSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource", + "description": "Structured or unstructured data." }, - "targetSite": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite", - "description": "Required. The TargetSite to create." + "websiteDataSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource", + "description": "Website data." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCustomAttribute": { - "description": "A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.", - "id": "GoogleCloudDiscoveryengineV1alphaCustomAttribute", + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource": { + "description": "Data source contains files either in Cloud Storage or BigQuery.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource", "properties": { - "numbers": { - "description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "items": { - "format": "double", - "type": "number" - }, - "type": "array" + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "BigQuery input source." }, - "text": { - "description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource": { + "description": "Data source is a set of website patterns that we crawl to get the total number of websites.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource", + "properties": { + "estimatorUriPatterns": { + "description": "Required. The URI patterns to estimate the data sizes. At most 10 patterns are allowed, otherwise an INVALID_ARGUMENT error is thrown.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec": { - "description": "Defines custom fine tuning spec.", - "id": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern": { + "description": "URI patterns that we use to crawl.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern", "properties": { - "enableSearchAdaptor": { - "description": "Whether or not to enable and include custom fine tuned search adaptor model.", + "exactMatch": { + "description": "Whether we infer the generated URI or use the exact provided one.", + "type": "boolean" + }, + "exclusive": { + "description": "Whether the pattern is exclusive or not. If set to true, the pattern is considered exclusive. If unset or set to false, the pattern is considered inclusive by default.", "type": "boolean" + }, + "providedUriPattern": { + "description": "User provided URI pattern. For example, `foo.com/bar/*`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCustomTuningModel": { - "description": "Metadata that describes a custom tuned model.", - "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { + "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", "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" - ], - "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." - ], - "type": "string" - }, - "modelVersion": { - "description": "The version of the model.", + "dataSizeBytes": { + "description": "Data size in terms of bytes.", "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", + "documentCount": { + "description": "Total number of documents.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "GoogleCloudDiscoveryengineV1alphaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluation", "properties": { - "aclEnabled": { - "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", - "type": "boolean" - }, - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", - "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" - ], - "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." - ], - "type": "string" - }, "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", + "description": "Output only. Timestamp the Evaluation was created at.", "format": "google-datetime", "readOnly": true, "type": "string" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", + "format": "google-datetime", "readOnly": true, "type": "string" }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - "type": "string" + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "readOnly": true, + "type": "array" }, - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Output only. Data store level identity provider config.", + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." + }, + "name": { + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", "readOnly": true }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", + "state": { + "description": "Output only. The state of the evaluation.", "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" ], "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." ], + "readOnly": true, "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", + "properties": { + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." }, - "languageInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", - "description": "Language info for DataStore." - }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", + "properties": { + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", "type": "string" - }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", - "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" - }, - "type": "array" - }, - "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata": { + "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -10650,361 +12123,476 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse": { + "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "outputResult": { + "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResult", + "description": "Output result indicating where the data were exported to." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of the export operation." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaFactChunk": { + "description": "Fact Chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaFactChunk", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunkText": { + "description": "Text content of the fact chunk. Can be at most 10K characters long.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "index": { + "description": "The index of this chunk. Currently, only used for the streaming mode.", + "format": "int32", + "type": "integer" + }, + "source": { + "description": "Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.", "type": "string" + }, + "sourceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "More fine-grained information for the source reference.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse": { + "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", + "id": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "targetSites": { + "description": "List of TargetSites containing the site verification status.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + }, + "type": "array" + }, + "totalSize": { + "description": "The total number of items matching the request. This will always be populated in the response.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaFhirStoreSource": { + "description": "Cloud FhirStore source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaFhirStoreSource", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "fhirStore": { + "description": "Required. The full resource name of the FHIR store to import data from, in the format of `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the FhirStore export to a specific Cloud Storage directory.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest": { - "description": "Request message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocument": { - "description": "Document captures all raw metadata information of items to be recommended or searched.", - "id": "GoogleCloudDiscoveryengineV1alphaDocument", + "GoogleCloudDiscoveryengineV1alphaFieldConfig": { + "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", + "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", "properties": { - "aclInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", - "description": "Access control information for the document." + "advancedSiteSearchDataSources": { + "description": "If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged. Assuming a page with `` in meta tag, and `` in page map: if this enum is set to METATAGS, we will only index ``; if this enum is not set, we will merge them and index ``.", + "items": { + "enum": [ + "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", + "METATAGS", + "PAGEMAP", + "SCHEMA_ORG" + ], + "enumDescriptions": [ + "Value used when unset.", + "Retrieve value from meta tag.", + "Retrieve value from page map.", + "Retrieve value from schema.org data." + ], + "type": "string" + }, + "type": "array" }, - "content": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentContent", - "description": "The unstructured data linked to this document. Content must be set if this document is under a `CONTENT_REQUIRED` data store." + "completableOption": { + "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "COMPLETABLE_OPTION_UNSPECIFIED", + "COMPLETABLE_ENABLED", + "COMPLETABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Completable option enabled for a schema field.", + "Completable option disabled for a schema field." + ], + "type": "string" }, - "derivedStructData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.", - "readOnly": true, - "type": "object" + "dynamicFacetableOption": { + "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", + "DYNAMIC_FACETABLE_ENABLED", + "DYNAMIC_FACETABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Dynamic facetable option enabled for a schema field.", + "Dynamic facetable option disabled for a schema field." + ], + "type": "string" }, - "id": { - "description": "Immutable. The identifier of the document. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "fieldPath": { + "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", "type": "string" }, - "indexTime": { - "description": "Output only. The last time the document was indexed. If this field is set, the document could be returned in search results. This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.", - "format": "google-datetime", + "fieldType": { + "description": "Output only. Raw type of the field.", + "enum": [ + "FIELD_TYPE_UNSPECIFIED", + "OBJECT", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "GEOLOCATION", + "DATETIME" + ], + "enumDescriptions": [ + "Field type is unspecified.", + "Field value type is Object.", + "Field value type is String.", + "Field value type is Number.", + "Field value type is Integer.", + "Field value type is Boolean.", + "Field value type is Geolocation. Geolocation is expressed as an object with the following keys: * `id`: a string representing the location id * `longitude`: a number representing the longitude coordinate of the location * `latitude`: a number repesenting the latitude coordinate of the location * `address`: a string representing the full address of the location `latitude` and `longitude` must always be provided together. At least one of a) `address` or b) `latitude`-`longitude` pair must be provided.", + "Field value type is Datetime. Datetime can be expressed as either: * a number representing milliseconds-since-the-epoch * a string representing milliseconds-since-the-epoch. e.g. `\"1420070400001\"` * a string representing the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date or date and time. e.g. `\"2015-01-01\"` or `\"2015-01-01T12:10:30Z\"`" + ], "readOnly": true, "type": "string" }, - "jsonData": { - "description": "The JSON string representation of the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", + "indexableOption": { + "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "INDEXABLE_OPTION_UNSPECIFIED", + "INDEXABLE_ENABLED", + "INDEXABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Indexable option enabled for a schema field.", + "Indexable option disabled for a schema field." + ], "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "keyPropertyType": { + "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", + "readOnly": true, "type": "string" }, - "parentDocumentId": { - "description": "The identifier of the parent document. Currently supports at most two level document hierarchy. Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + "recsFilterableOption": { + "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", + "enum": [ + "FILTERABLE_OPTION_UNSPECIFIED", + "FILTERABLE_ENABLED", + "FILTERABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Filterable option enabled for a schema field.", + "Filterable option disabled for a schema field." + ], "type": "string" }, - "schemaId": { - "description": "The identifier of the schema located in the same data store.", + "retrievableOption": { + "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Retrievable option enabled for a schema field.", + "Retrievable option disabled for a schema field." + ], "type": "string" }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "schemaOrgPaths": { + "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", + "items": { + "type": "string" }, - "description": "The structured JSON data for the document. It should conform to the registered Schema or an `INVALID_ARGUMENT` error is thrown.", - "type": "object" + "type": "array" + }, + "searchableOption": { + "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "SEARCHABLE_OPTION_UNSPECIFIED", + "SEARCHABLE_ENABLED", + "SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Searchable option enabled for a schema field.", + "Searchable option disabled for a schema field." + ], + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo": { - "description": "ACL Information of the Document.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfo", + "GoogleCloudDiscoveryengineV1alphaFirestoreSource": { + "description": "Firestore source import data from.", + "id": "GoogleCloudDiscoveryengineV1alphaFirestoreSource", "properties": { - "readers": { - "description": "Readers of the document.", + "collectionId": { + "description": "Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters.", + "type": "string" + }, + "databaseId": { + "description": "Required. The Firestore database to copy the data from with a length limit of 256 characters.", + "type": "string" + }, + "gcsStagingDir": { + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Ensure that the Firestore service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", + "type": "string" + }, + "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.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaGcsSource": { + "description": "Cloud Storage location for input content.", + "id": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "properties": { + "dataSchema": { + "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user event imports: * `user_event` (default): One JSON UserEvent per line.", + "type": "string" + }, + "inputUris": { + "description": "Required. Cloud Storage URIs to input files. Each URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files (or 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is `content`).", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction" + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction": { - "description": "AclRestriction to model complex inheritance restrictions. Example: Modeling a \"Both Permit\" inheritance, where to access a child document, user needs to have access to parent document. Document Hierarchy - Space_S --\u003e Page_P. Readers: Space_S: group_1, user_1 Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ] } ] } } Page_P ACL Restriction. { \"acl_info\": { \"readers\": [ { \"principals\": [ { \"group_id\": \"group_2\" }, { \"group_id\": \"group_3\" }, { \"user_id\": \"user_2\" } ], }, { \"principals\": [ { \"group_id\": \"group_1\" }, { \"user_id\": \"user_1\" } ], } ] } }", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction", + "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", "properties": { - "principals": { - "description": "List of principals.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaPrincipal" + "documentDataMap": { + "additionalProperties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" }, - "type": "array" + "description": "Document data keyed by URI pattern. For example: document_data_map = { \"www.url1.com/*\": { \"Categories\": [\"category1\", \"category2\"] }, \"www.url2.com/*\": { \"Categories\": [\"category3\"] } }", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentContent": { - "description": "Unstructured data linked to this document.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentContent", + "GoogleCloudDiscoveryengineV1alphaGroundingFact": { + "description": "Grounding Fact.", + "id": "GoogleCloudDiscoveryengineV1alphaGroundingFact", "properties": { - "mimeType": { - "description": "The MIME type of the content. Supported types: * `application/pdf` (PDF, only native PDFs are supported for now) * `text/html` (HTML) * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX) * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX) * `text/plain` (TXT) See https://www.iana.org/assignments/media-types/media-types.xhtml.", - "type": "string" - }, - "rawBytes": { - "description": "The content represented as a stream of bytes. The maximum length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, this field is represented as pure binary in Protocol Buffers and base64-encoded string in JSON. For example, `abc123!?$*\u0026()'-=@~` should be represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See https://developers.google.com/protocol-buffers/docs/proto3#json.", - "format": "byte", - "type": "string" + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.", + "type": "object" }, - "uri": { - "description": "The URI of the content. Only Cloud Storage URIs (e.g. `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 MB for text-based formats, 200 MB for other formats.", + "factText": { + "description": "Text content of the fact. Can be at most 10K characters long.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentInfo": { - "description": "Detailed document information associated with a user event.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentInfo", + "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec": { + "description": "Defines guided search spec.", + "id": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", "properties": { - "id": { - "description": "The Document resource ID.", - "type": "string" - }, - "name": { - "description": "The Document resource full name, of the form: `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`", - "type": "string" + "enableRefinementAttributes": { + "description": "Whether or not to enable and include refinement attributes in gudied search result.", + "type": "boolean" }, - "promotionIds": { - "description": "The promotion IDs associated with this Document. Currently, this field is restricted to at most one ID.", - "items": { - "type": "string" - }, - "type": "array" + "enableRelatedQuestions": { + "description": "Whether or not to enable and include related questions in search response.", + "type": "boolean" }, - "quantity": { - "description": "Quantity of the Document associated with the user event. Defaults to 1. For example, this field is 2 if two quantities of the same Document are involved in a `add-to-cart` event. Required for events of the following event types: * `add-to-cart` * `purchase`", + "maxRelatedQuestions": { + "description": "Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.", "format": "int32", "type": "integer" - }, - "uri": { - "description": "The Document URI - only allowed for website data stores.", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1alphaIdpConfig": { + "description": "Identity Provider Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + "externalIdpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "description": "External Identity provider config." }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "idpType": { + "description": "Identity provider type configured.", + "enum": [ + "IDP_TYPE_UNSPECIFIED", + "GSUITE", + "THIRD_PARTY" + ], + "enumDescriptions": [ + "Default value. ACL search not enabled.", + "Google 1P provider.", + "Third party provider." + ], "type": "string" - }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" - }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { + "description": "Third party IDP Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "workforcePoolName": { + "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest": { + "description": "Request message for CompletionService.ImportCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "BigQuery input source." }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource", + "description": "The Inline source for suggestion entries." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource": { + "description": "The inline source for CompletionSuggestions.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", + "suggestions": { + "description": "Required. A list of all denylist entries to import. Max of 1000 items.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion" }, "type": "array" - }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDoubleList": { - "description": "Double list.", - "id": "GoogleCloudDiscoveryengineV1alphaDoubleList", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", "properties": { - "values": { - "description": "Double values.", + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "format": "double", - "type": "number" + "$ref": "GoogleRpcStatus" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig": { - "description": "Defines embedding config, used for bring your own embeddings feature.", - "id": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", - "properties": { - "fieldPath": { - "description": "Full field path in the schema mapped as embedding field.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -11013,1006 +12601,937 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest": { - "description": "Request message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaEngine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngine", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest": { + "description": "Request message for Import methods.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." - }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true + "alloyDbSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAlloyDbSource", + "description": "AlloyDB input source." }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." + "autoGenerateIds": { + "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", + "type": "boolean" }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "BigQuery input source." }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", - "items": { - "type": "string" - }, - "type": "array" + "bigtableSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableSource", + "description": "Cloud Bigtable input source." }, - "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", - "type": "string" + "cloudSqlSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCloudSqlSource", + "description": "Cloud SQL input source." }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." }, - "mediaRecommendationEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", - "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." + "fhirStoreSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFhirStoreSource", + "description": "FhirStore input source." }, - "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", - "type": "string" + "firestoreSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFirestoreSource", + "description": "Firestore input source." }, - "recommendationMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", - "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", - "readOnly": true + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content." }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + "idField": { + "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", + "type": "string" }, - "similarDocumentsConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", - "description": "Additional config specs for a `similar-items` engine." + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", + "description": "The Inline source for the input content for documents." }, - "solutionType": { - "description": "Required. The solutions of the engine.", + "reconciliationMode": { + "description": "The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.", "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" + "RECONCILIATION_MODE_UNSPECIFIED", + "INCREMENTAL", + "FULL" ], "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + "Defaults to `INCREMENTAL`.", + "Inserts new documents or updates existing documents.", + "Calculates diff and replaces the entire document dataset. Existing documents may be deleted if they are not present in the source location." ], "type": "string" }, - "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", - "format": "google-datetime", - "readOnly": true, + "spannerSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSpannerSource", + "description": "Spanner input source." + }, + "updateMask": { + "description": "Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields.", + "format": "google-fieldmask", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource": { + "description": "The inline source for the input config for ImportDocuments method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." - }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", - "type": "string" + "documents": { + "description": "Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", - "type": "string" - }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", - "type": "string" - }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", - "type": "string" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "createTime": { + "description": "ImportSampleQueries operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { - "description": "Additional config specs for a Media Recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest": { + "description": "Request message for SampleQueryService.ImportSampleQueries method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest", "properties": { - "optimizationObjective": { - "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", - "type": "string" + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", + "description": "BigQuery input source." }, - "optimizationObjectiveConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", - "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." }, - "trainingState": { - "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", - "enum": [ - "TRAINING_STATE_UNSPECIFIED", - "PAUSED", - "TRAINING" - ], - "enumDescriptions": [ - "Unspecified training state.", - "The engine training is paused.", - "The engine is training." - ], - "type": "string" + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content." }, - "type": { - "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", - "type": "string" + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource", + "description": "The Inline source for sample query entries." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { - "description": "Custom threshold for `cvr` optimization_objective.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource": { + "description": "The inline source for SampleQuerys.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource", "properties": { - "targetField": { - "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", - "type": "string" - }, - "targetFieldValueFloat": { - "description": "Required. The threshold to be applied to the target (e.g., 0.5).", - "format": "float", - "type": "number" + "sampleQueries": { + "description": "Required. A list of SampleQuerys to import. Max of 1000 items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { - "description": "Additional information of a recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse", "properties": { - "dataState": { - "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", - "enum": [ - "DATA_STATE_UNSPECIFIED", - "DATA_OK", - "DATA_ERROR" - ], - "enumDescriptions": [ - "Unspecified default value, should never be explicitly set.", - "The engine has sufficient training data.", - "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." - ], - "readOnly": true, - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." }, - "lastTuneTime": { - "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", "format": "google-datetime", - "readOnly": true, "type": "string" }, - "servingState": { - "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", - "enum": [ - "SERVING_STATE_UNSPECIFIED", - "INACTIVE", - "ACTIVE", - "TUNED" - ], - "enumDescriptions": [ - "Unspecified serving state.", - "The engine is not serving.", - "The engine is serving and can be queried.", - "The engine is trained on tuned hyperparameters and can be queried." - ], - "readOnly": true, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest": { + "description": "Request message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest", + "properties": { + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "description": "Cloud Storage location for the input content. Only 1 file can be specified that contains all entries to import. Supported values `gcs_source.schema` for autocomplete suggestion deny list entry imports: * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per line." }, - "tuningOperation": { - "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", - "readOnly": true, - "type": "string" + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource", + "description": "The Inline source for the input content for suggestion deny list entries." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource": { + "description": "The inline source for SuggestionDenyListEntry.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", + "entries": { + "description": "Required. A list of all denylist entries to import. Max of 1000 items.", "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry" }, "type": "array" - }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { - "description": "Additional config specs for a `similar-items` engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { - "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", + "type": "string" + }, + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest": { - "description": "Request message for EstimateBillingService.EstimateDataSize method", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest", + "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", "properties": { - "fileDataSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource", - "description": "Structured or unstructured data." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "websiteDataSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource", - "description": "Website data." + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource": { - "description": "Data source contains files either in Cloud Storage or BigQuery.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource", + "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest": { + "description": "Request message for the ImportUserEvents request.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest", "properties": { "bigquerySource": { "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", "description": "BigQuery input source." }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." + }, "gcsSource": { "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", "description": "Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", + "description": "The Inline source for the input content for UserEvents." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource": { - "description": "Data source is a set of website patterns that we crawl to get the total number of websites.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource", + "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource": { + "description": "The inline source for the input config for ImportUserEvents method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", "properties": { - "estimatorUriPatterns": { - "description": "Required. The URI patterns to estimate the data sizes. At most 10 patterns are allowed, otherwise an INVALID_ARGUMENT error is thrown.", + "userEvents": { + "description": "Required. A list of user events to import. Recommended max of 10k items.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern" + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern": { - "description": "URI patterns that we use to crawl.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern", + "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", "properties": { - "exactMatch": { - "description": "Whether we infer the generated URI or use the exact provided one.", - "type": "boolean" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaInterval": { + "description": "A floating point interval.", + "id": "GoogleCloudDiscoveryengineV1alphaInterval", + "properties": { + "exclusiveMaximum": { + "description": "Exclusive upper bound.", + "format": "double", + "type": "number" + }, + "exclusiveMinimum": { + "description": "Exclusive lower bound.", + "format": "double", + "type": "number" }, - "exclusive": { - "description": "Whether the pattern is exclusive or not. If set to true, the pattern is considered exclusive. If unset or set to false, the pattern is considered inclusive by default.", - "type": "boolean" + "maximum": { + "description": "Inclusive upper bound.", + "format": "double", + "type": "number" }, - "providedUriPattern": { - "description": "User provided URI pattern. For example, `foo.com/bar/*`.", - "type": "string" + "minimum": { + "description": "Inclusive lower bound.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { - "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", + "GoogleCloudDiscoveryengineV1alphaLanguageInfo": { + "description": "Language info for DataStore.", + "id": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", "properties": { - "dataSizeBytes": { - "description": "Data size in terms of bytes.", - "format": "int64", + "language": { + "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", + "readOnly": true, "type": "string" }, - "documentCount": { - "description": "Total number of documents.", - "format": "int64", + "languageCode": { + "description": "The language code for the DataStore.", + "type": "string" + }, + "normalizedLanguageCode": { + "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata": { - "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaListChunksResponse": { + "description": "Response message for ChunkService.ListChunks method.", + "id": "GoogleCloudDiscoveryengineV1alphaListChunksResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "chunks": { + "description": "The Chunks.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "nextPageToken": { + "description": "A token that can be sent as ListChunksRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse": { - "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaListControlsResponse": { + "description": "Response for ListControls method.", + "id": "GoogleCloudDiscoveryengineV1alphaListControlsResponse", "properties": { - "outputResult": { - "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResult", - "description": "Output result indicating where the data were exported to." + "controls": { + "description": "All the Controls for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "type": "array" }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The status of the export operation." + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFactChunk": { - "description": "Fact Chunk.", - "id": "GoogleCloudDiscoveryengineV1alphaFactChunk", + "GoogleCloudDiscoveryengineV1alphaListConversationsResponse": { + "description": "Response for ListConversations method.", + "id": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse", "properties": { - "chunkText": { - "description": "Text content of the fact chunk. Can be at most 10K characters long.", - "type": "string" - }, - "index": { - "description": "The index of this chunk. Currently, only used for the streaming mode.", - "format": "int32", - "type": "integer" + "conversations": { + "description": "All the Conversations for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + }, + "type": "array" }, - "source": { - "description": "Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.", + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", "type": "string" - }, - "sourceMetadata": { - "additionalProperties": { - "type": "string" - }, - "description": "More fine-grained information for the source reference.", - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse": { - "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", - "id": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse", + "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse", "properties": { - "nextPageToken": { - "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "targetSites": { - "description": "List of TargetSites containing the site verification status.", + "models": { + "description": "List of custom tuning models.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel" }, "type": "array" - }, - "totalSize": { - "description": "The total number of items matching the request. This will always be populated in the response.", - "format": "int32", - "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFhirStoreSource": { - "description": "Cloud FhirStore source import data from.", - "id": "GoogleCloudDiscoveryengineV1alphaFhirStoreSource", + "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse": { + "description": "Response message for DataStoreService.ListDataStores method.", + "id": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse", "properties": { - "fhirStore": { - "description": "Required. The full resource name of the FHIR store to import data from, in the format of `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`.", - "type": "string" + "dataStores": { + "description": "All the customer's DataStores.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + }, + "type": "array" }, - "gcsStagingDir": { - "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the FhirStore export to a specific Cloud Storage directory.", + "nextPageToken": { + "description": "A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFieldConfig": { - "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", - "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", + "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse": { + "description": "Response message for DocumentService.ListDocuments method.", + "id": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse", "properties": { - "advancedSiteSearchDataSources": { - "description": "If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged. Assuming a page with `` in meta tag, and `` in page map: if this enum is set to METATAGS, we will only index ``; if this enum is not set, we will merge them and index ``.", + "documents": { + "description": "The Documents.", "items": { - "enum": [ - "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", - "METATAGS", - "PAGEMAP", - "SCHEMA_ORG" - ], - "enumDescriptions": [ - "Value used when unset.", - "Retrieve value from meta tag.", - "Retrieve value from page map.", - "Retrieve value from schema.org data." - ], - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" }, "type": "array" }, - "completableOption": { - "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "COMPLETABLE_OPTION_UNSPECIFIED", - "COMPLETABLE_ENABLED", - "COMPLETABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Completable option enabled for a schema field.", - "Completable option disabled for a schema field." - ], - "type": "string" - }, - "dynamicFacetableOption": { - "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", - "DYNAMIC_FACETABLE_ENABLED", - "DYNAMIC_FACETABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Dynamic facetable option enabled for a schema field.", - "Dynamic facetable option disabled for a schema field." - ], - "type": "string" - }, - "fieldPath": { - "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", - "type": "string" - }, - "fieldType": { - "description": "Output only. Raw type of the field.", - "enum": [ - "FIELD_TYPE_UNSPECIFIED", - "OBJECT", - "STRING", - "NUMBER", - "INTEGER", - "BOOLEAN", - "GEOLOCATION", - "DATETIME" - ], - "enumDescriptions": [ - "Field type is unspecified.", - "Field value type is Object.", - "Field value type is String.", - "Field value type is Number.", - "Field value type is Integer.", - "Field value type is Boolean.", - "Field value type is Geolocation. Geolocation is expressed as an object with the following keys: * `id`: a string representing the location id * `longitude`: a number representing the longitude coordinate of the location * `latitude`: a number repesenting the latitude coordinate of the location * `address`: a string representing the full address of the location `latitude` and `longitude` must always be provided together. At least one of a) `address` or b) `latitude`-`longitude` pair must be provided.", - "Field value type is Datetime. Datetime can be expressed as either: * a number representing milliseconds-since-the-epoch * a string representing milliseconds-since-the-epoch. e.g. `\"1420070400001\"` * a string representing the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date or date and time. e.g. `\"2015-01-01\"` or `\"2015-01-01T12:10:30Z\"`" - ], - "readOnly": true, - "type": "string" - }, - "indexableOption": { - "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "INDEXABLE_OPTION_UNSPECIFIED", - "INDEXABLE_ENABLED", - "INDEXABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Indexable option enabled for a schema field.", - "Indexable option disabled for a schema field." - ], - "type": "string" - }, - "keyPropertyType": { - "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", - "readOnly": true, + "nextPageToken": { + "description": "A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListEnginesResponse": { + "description": "Response message for EngineService.ListEngines method.", + "id": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse", + "properties": { + "engines": { + "description": "All the customer's Engines.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + }, + "type": "array" }, - "recsFilterableOption": { - "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", - "enum": [ - "FILTERABLE_OPTION_UNSPECIFIED", - "FILTERABLE_ENABLED", - "FILTERABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Filterable option enabled for a schema field.", - "Filterable option disabled for a schema field." - ], + "nextPageToken": { + "description": "Not supported.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse": { + "description": "Response message for EvaluationService.ListEvaluationResults method.", + "id": "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse", + "properties": { + "evaluationResults": { + "description": "The EvaluationResults.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult" + }, + "type": "array" }, - "retrievableOption": { - "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "RETRIEVABLE_OPTION_UNSPECIFIED", - "RETRIEVABLE_ENABLED", - "RETRIEVABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Retrievable option enabled for a schema field.", - "Retrievable option disabled for a schema field." - ], + "nextPageToken": { + "description": "A token that can be sent as ListEvaluationResultsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult": { + "description": "Represents the results of an evaluation for a single SampleQuery.", + "id": "GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult", + "properties": { + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, for a given SampleQuery.", + "readOnly": true }, - "schemaOrgPaths": { - "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", + "sampleQuery": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery", + "description": "Output only. The SampleQuery that was evaluated.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse": { + "description": "Response message for EvaluationService.ListEvaluations method.", + "id": "GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse", + "properties": { + "evaluations": { + "description": "The Evaluations.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluation" }, "type": "array" }, - "searchableOption": { - "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "SEARCHABLE_OPTION_UNSPECIFIED", - "SEARCHABLE_ENABLED", - "SEARCHABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Searchable option enabled for a schema field.", - "Searchable option disabled for a schema field." - ], + "nextPageToken": { + "description": "A token that can be sent as ListEvaluationsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFirestoreSource": { - "description": "Firestore source import data from.", - "id": "GoogleCloudDiscoveryengineV1alphaFirestoreSource", + "GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse": { + "description": "Response message for SampleQueryService.ListSampleQueries method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse", "properties": { - "collectionId": { - "description": "Required. The Firestore collection (or entity) to copy the data from with a length limit of 1,500 characters.", + "nextPageToken": { + "description": "A token that can be sent as ListSampleQueriesRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "databaseId": { - "description": "Required. The Firestore database to copy the data from with a length limit of 256 characters.", + "sampleQueries": { + "description": "The SampleQuerys.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuery" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse": { + "description": "Response message for SampleQuerySetService.ListSampleQuerySets method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as ListSampleQuerySetsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "gcsStagingDir": { - "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Ensure that the Firestore service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", + "sampleQuerySets": { + "description": "The SampleQuerySets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSchemasResponse": { + "description": "Response message for SchemaService.ListSchemas method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as ListSchemasRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "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.", - "type": "string" + "schemas": { + "description": "The Schemas.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaGcsSource": { - "description": "Cloud Storage location for input content.", - "id": "GoogleCloudDiscoveryengineV1alphaGcsSource", + "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse": { + "description": "Response for ListServingConfigs method.", + "id": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse", "properties": { - "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user event imports: * `user_event` (default): One JSON UserEvent per line.", + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", "type": "string" }, - "inputUris": { - "description": "Required. Cloud Storage URIs to input files. Each URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files (or 100,000 files if `data_schema` is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is `content`).", + "servingConfigs": { + "description": "All the ServingConfigs for a given dataStore.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaGroundingFact": { - "description": "Grounding Fact.", - "id": "GoogleCloudDiscoveryengineV1alphaGroundingFact", + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", "properties": { - "attributes": { - "additionalProperties": { - "type": "string" - }, - "description": "Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.", - "type": "object" - }, - "factText": { - "description": "Text content of the fact. Can be at most 10K characters long.", + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", "type": "string" + }, + "sessions": { + "description": "All the Sessions for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec": { - "description": "Defines guided search spec.", - "id": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", + "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.ListTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse", "properties": { - "enableRefinementAttributes": { - "description": "Whether or not to enable and include refinement attributes in gudied search result.", - "type": "boolean" + "nextPageToken": { + "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" }, - "enableRelatedQuestions": { - "description": "Whether or not to enable and include related questions in search response.", - "type": "boolean" + "targetSites": { + "description": "List of TargetSites.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + }, + "type": "array" }, - "maxRelatedQuestions": { - "description": "Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.", + "totalSize": { + "description": "The total number of items matching the request. This will always be populated in the response.", "format": "int32", "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaIdpConfig": { - "description": "Identity Provider Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "GoogleCloudDiscoveryengineV1alphaMediaInfo": { + "description": "Media-specific user event information.", + "id": "GoogleCloudDiscoveryengineV1alphaMediaInfo", "properties": { - "externalIdpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", - "description": "External Identity provider config." - }, - "idpType": { - "description": "Identity provider type configured.", - "enum": [ - "IDP_TYPE_UNSPECIFIED", - "GSUITE", - "THIRD_PARTY" - ], - "enumDescriptions": [ - "Default value. ACL search not enabled.", - "Google 1P provider.", - "Third party provider." - ], + "mediaProgressDuration": { + "description": "The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90.", + "format": "google-duration", "type": "string" + }, + "mediaProgressPercentage": { + "description": "Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { - "description": "Third party IDP Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "GoogleCloudDiscoveryengineV1alphaOutputResult": { + "description": "Output result that stores the information about where the exported data is stored.", + "id": "GoogleCloudDiscoveryengineV1alphaOutputResult", "properties": { - "workforcePoolName": { - "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + "bigqueryResult": { + "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", + "description": "The BigQuery location where the result is stored." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult": { + "description": "A BigQuery output result.", + "id": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", + "properties": { + "datasetId": { + "description": "The ID of a BigQuery Dataset.", + "type": "string" + }, + "tableId": { + "description": "The ID of a BigQuery Table.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaPageInfo": { + "description": "Detailed page information.", + "id": "GoogleCloudDiscoveryengineV1alphaPageInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "pageCategory": { + "description": "The most specific category associated with a category page. To represent full path of category, use '\u003e' sign to separate different hierarchies. If '\u003e' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `\"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", + "pageviewId": { + "description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageview_id` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", "type": "string" }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", + "referrerUri": { + "description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "uri": { + "description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest": { - "description": "Request message for CompletionService.ImportCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest", + "GoogleCloudDiscoveryengineV1alphaPanelInfo": { + "description": "Detailed panel information associated with a user event.", + "id": "GoogleCloudDiscoveryengineV1alphaPanelInfo", "properties": { - "bigquerySource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", - "description": "BigQuery input source." + "displayName": { + "description": "The display name of the panel.", + "type": "string" }, - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." + "panelId": { + "description": "Required. The panel ID.", + "type": "string" }, - "gcsSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Cloud Storage location for the input content." + "panelPosition": { + "description": "The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.", + "format": "int32", + "type": "integer" }, - "inlineSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource", - "description": "The Inline source for suggestion entries." + "totalPanels": { + "description": "The total number of panels, including this one, shown to the user. Must be set if panel_position is set.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource": { - "description": "The inline source for CompletionSuggestions.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequestInlineSource", + "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest": { + "description": "Request for pausing training of an engine.", + "id": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPrincipal": { + "description": "Principal identifier of a user or a group.", + "id": "GoogleCloudDiscoveryengineV1alphaPrincipal", "properties": { - "suggestions": { - "description": "Required. A list of all denylist entries to import. Max of 1000 items.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionSuggestion" - }, - "type": "array" + "groupId": { + "description": "Group identifier. For Google Workspace user account, group_id should be the google workspace group email. For non-google identity provider user account, group_id is the mapped group identifier configured during the workforcepool config.", + "type": "string" + }, + "userId": { + "description": "User identifier. For Google Workspace user account, user_id should be the google workspace user email. For non-google identity provider user account, user_id is the mapped user identifier configured during the workforcepool config.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaProcessedDocument": { + "description": "Document captures all raw metadata information of items to be recommended or searched.", + "id": "GoogleCloudDiscoveryengineV1alphaProcessedDocument", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." + "document": { + "description": "Required. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.", + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "jsonData": { + "description": "The JSON string representation of the processed document.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1alphaProject", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. The timestamp when this project is created.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, - "totalCount": { - "description": "Total count of entries that were processed.", - "format": "int64", + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", "format": "google-datetime", + "readOnly": true, "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest": { - "description": "Request message for Import methods.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest", + "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms", "properties": { - "alloyDbSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAlloyDbSource", - "description": "AlloyDB input source." - }, - "autoGenerateIds": { - "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", - "type": "boolean" - }, - "bigquerySource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", - "description": "BigQuery input source." - }, - "bigtableSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigtableSource", - "description": "Cloud Bigtable input source." - }, - "cloudSqlSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCloudSqlSource", - "description": "Cloud SQL input source." - }, - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." - }, - "fhirStoreSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFhirStoreSource", - "description": "FhirStore input source." - }, - "firestoreSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFirestoreSource", - "description": "Firestore input source." - }, - "gcsSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Cloud Storage location for the input content." + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" }, - "idField": { - "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", "type": "string" }, - "inlineSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", - "description": "The Inline source for the input content for documents." + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" }, - "reconciliationMode": { - "description": "The mode of reconciliation between existing documents and the documents to be imported. Defaults to ReconciliationMode.INCREMENTAL.", + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", "enum": [ - "RECONCILIATION_MODE_UNSPECIFIED", - "INCREMENTAL", - "FULL" + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" ], "enumDescriptions": [ - "Defaults to `INCREMENTAL`.", - "Inserts new documents or updates existing documents.", - "Calculates diff and replaces the entire document dataset. Existing documents may be deleted if they are not present in the source location." + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." ], "type": "string" }, - "spannerSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSpannerSource", - "description": "Spanner input source." - }, - "updateMask": { - "description": "Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields.", - "format": "google-fieldmask", + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource": { - "description": "The inline source for the input config for ImportDocuments method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource", - "properties": { - "documents": { - "description": "Required. A list of documents to update/create. Each document must have a valid Document.id. Recommended max of 100 items.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" - }, - "type": "array" - } - }, + "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest": { + "description": "Request for ProjectService.ProvisionProject method.", + "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "acceptDataUseTerms": { + "description": "Required. Set to `true` to specify that caller has read and would like to give consent to the [Terms for data use](https://cloud.google.com/retail/data-use-terms).", + "type": "boolean" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "dataUseTermsVersion": { + "description": "Required. The version of the [Terms for data use](https://cloud.google.com/retail/data-use-terms) that caller has read and would like to give consent to. Acceptable version is `2022-11-23`, and this may change over time.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -12027,38 +13546,15 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest": { - "description": "Request message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest", - "properties": { - "gcsSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Cloud Storage location for the input content. Only 1 file can be specified that contains all entries to import. Supported values `gcs_source.schema` for autocomplete suggestion deny list entry imports: * `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per line." - }, - "inlineSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource", - "description": "The Inline source for the input content for suggestion deny list entries." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource": { - "description": "The inline source for SuggestionDenyListEntry.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource", - "properties": { - "entries": { - "description": "Required. A list of all denylist entries to import. Max of 1000 items.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry" - }, - "type": "array" - } - }, + "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest": { + "description": "Request message for CompletionService.PurgeCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse": { + "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse", "properties": { "errorSamples": { "description": "A sample of errors encountered while processing the request.", @@ -12067,22 +13563,16 @@ }, "type": "array" }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", - "type": "string" - }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", - "type": "string" + "purgeSucceeded": { + "description": "Whether the completion suggestions were successfully purged.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -12094,8 +13584,13 @@ "format": "int64", "type": "string" }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, "successCount": { - "description": "Count of entries that were processed successfully.", + "description": "Count of entries that were deleted successfully.", "format": "int64", "type": "string" }, @@ -12107,2978 +13602,3135 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest": { - "description": "Request message for the ImportUserEvents request.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest", + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest": { + "description": "Request message for DocumentService.PurgeDocuments method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest", "properties": { - "bigquerySource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", - "description": "BigQuery input source." - }, "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." + "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", + "description": "The desired location of errors incurred during the purge." + }, + "filter": { + "description": "Required. Filter matching documents to purge. Only currently supported value is `*` (all items).", + "type": "string" + }, + "force": { + "description": "Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents.", + "type": "boolean" }, "gcsSource": { "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Cloud Storage location for the input content." - }, - "inlineSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", - "description": "The Inline source for the input content for UserEvents." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource": { - "description": "The inline source for the input config for ImportUserEvents method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource", - "properties": { - "userEvents": { - "description": "Required. A list of user events to import. Recommended max of 10k items.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" - }, - "type": "array" + "description": "Cloud Storage location for the input content. Supported `data_schema`: * `document_id`: One valid Document.id per line." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", "items": { - "$ref": "GoogleRpcStatus" + "type": "string" }, "type": "array" - }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", - "type": "string" - }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaInterval": { - "description": "A floating point interval.", - "id": "GoogleCloudDiscoveryengineV1alphaInterval", + "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig": { + "description": "Configuration of destination for Purge related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", "properties": { - "exclusiveMaximum": { - "description": "Exclusive upper bound.", - "format": "double", - "type": "number" - }, - "exclusiveMinimum": { - "description": "Exclusive lower bound.", - "format": "double", - "type": "number" - }, - "maximum": { - "description": "Inclusive upper bound.", - "format": "double", - "type": "number" - }, - "minimum": { - "description": "Inclusive lower bound.", - "format": "double", - "type": "number" + "gcsPrefix": { + "description": "Cloud Storage prefix for purge errors. This must be an empty, existing Cloud Storage directory. Purge errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaLanguageInfo": { - "description": "Language info for DataStore.", - "id": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", "properties": { - "language": { - "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", - "readOnly": true, - "type": "string" - }, - "languageCode": { - "description": "The language code for the DataStore.", - "type": "string" - }, - "normalizedLanguageCode": { - "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", - "readOnly": true, + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "region": { - "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", - "readOnly": true, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListChunksResponse": { - "description": "Response message for ChunkService.ListChunks method.", - "id": "GoogleCloudDiscoveryengineV1alphaListChunksResponse", - "properties": { - "chunks": { - "description": "The Chunks.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token that can be sent as ListChunksRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - } - }, + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest": { + "description": "Request message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListControlsResponse": { - "description": "Response for ListControls method.", - "id": "GoogleCloudDiscoveryengineV1alphaListControlsResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", "properties": { - "controls": { - "description": "All the Controls for a given data store.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "nextPageToken": { - "description": "Pagination token, if not returned indicates the last page.", + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListConversationsResponse": { - "description": "Response for ListConversations method.", - "id": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { + "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", "properties": { - "conversations": { - "description": "All the Conversations for a given data store.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - }, - "type": "array" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "nextPageToken": { - "description": "Pagination token, if not returned indicates the last page.", + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse": { - "description": "Response message for SearchTuningService.ListCustomModels method.", - "id": "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest": { + "description": "Request message for PurgeUserEvents method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest", "properties": { - "models": { - "description": "List of custom tuning models.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel" - }, - "type": "array" + "filter": { + "description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `userPseudoId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType: `eventType = \"search\"` * Deleting all events for a specific visitor: `userPseudoId = \"visitor1024\"` * Deleting all events inside a DataStore: `*` The filtering fields are assumed to have an implicit AND.", + "type": "string" + }, + "force": { + "description": "The `force` field is currently not supported. Purge user event requests will permanently delete all purgeable events. Once the development is complete: If `force` is set to false, the method will return the expected purge count without deleting any user events. This field will default to false if not included in the request.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse": { - "description": "Response message for DataStoreService.ListDataStores method.", - "id": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { + "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", "properties": { - "dataStores": { - "description": "All the customer's DataStores.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token that can be sent as ListDataStoresRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "purgeCount": { + "description": "The total count of events purged as a result of the operation.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse": { - "description": "Response message for DocumentService.ListDocuments method.", - "id": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", "properties": { - "documents": { - "description": "The Documents.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" - }, - "type": "array" + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" }, - "nextPageToken": { - "description": "A token that can be sent as ListDocumentsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListEnginesResponse": { - "description": "Response message for EngineService.ListEngines method.", - "id": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse", + "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", "properties": { - "engines": { - "description": "All the customer's Engines.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" - }, - "type": "array" + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" }, - "nextPageToken": { - "description": "Not supported.", - "type": "string" + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" + }, + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" + }, + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListSchemasResponse": { - "description": "Response message for SchemaService.ListSchemas method.", - "id": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse", + "GoogleCloudDiscoveryengineV1alphaQuery": { + "description": "Defines a user inputed query.", + "id": "GoogleCloudDiscoveryengineV1alphaQuery", "properties": { - "nextPageToken": { - "description": "A token that can be sent as ListSchemasRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "queryId": { + "description": "Unique Id for the query.", "type": "string" }, - "schemas": { - "description": "The Schemas.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" - }, - "type": "array" + "text": { + "description": "Plain text.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse": { - "description": "Response for ListServingConfigs method.", - "id": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse", + "GoogleCloudDiscoveryengineV1alphaRankRequest": { + "description": "Request message for RankService.Rank method.", + "id": "GoogleCloudDiscoveryengineV1alphaRankRequest", "properties": { - "nextPageToken": { - "description": "Pagination token, if not returned indicates the last page.", + "ignoreRecordDetailsInResponse": { + "description": "If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.", + "type": "boolean" + }, + "model": { + "description": "The identifier of the model to use. It is one of: * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input token size 512. It is set to `semantic-ranker-512@latest` by default if unspecified.", "type": "string" }, - "servingConfigs": { - "description": "All the ServingConfigs for a given dataStore.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { - "description": "Response for ListSessions method.", - "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", - "properties": { - "nextPageToken": { - "description": "Pagination token, if not returned indicates the last page.", + "query": { + "description": "The query to use.", "type": "string" }, - "sessions": { - "description": "All the Sessions for a given data store.", + "records": { + "description": "Required. A list of records to rank. At most 200 records to rank.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + "$ref": "GoogleCloudDiscoveryengineV1alphaRankingRecord" }, "type": "array" + }, + "topN": { + "description": "The number of results to return. If this is unset or no bigger than zero, returns all results.", + "format": "int32", + "type": "integer" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.ListTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse", + "GoogleCloudDiscoveryengineV1alphaRankResponse": { + "description": "Response message for RankService.Rank method.", + "id": "GoogleCloudDiscoveryengineV1alphaRankResponse", "properties": { - "nextPageToken": { - "description": "A token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", - "type": "string" - }, - "targetSites": { - "description": "List of TargetSites.", + "records": { + "description": "A list of records sorted by descending score.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + "$ref": "GoogleCloudDiscoveryengineV1alphaRankingRecord" }, "type": "array" - }, - "totalSize": { - "description": "The total number of items matching the request. This will always be populated in the response.", - "format": "int32", - "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaMediaInfo": { - "description": "Media-specific user event information.", - "id": "GoogleCloudDiscoveryengineV1alphaMediaInfo", + "GoogleCloudDiscoveryengineV1alphaRankingRecord": { + "description": "Record message for RankService.Rank method.", + "id": "GoogleCloudDiscoveryengineV1alphaRankingRecord", "properties": { - "mediaProgressDuration": { - "description": "The media progress time in seconds, if applicable. For example, if the end user has finished 90 seconds of a playback video, then MediaInfo.media_progress_duration.seconds should be set to 90.", - "format": "google-duration", + "content": { + "description": "The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.", "type": "string" }, - "mediaProgressPercentage": { - "description": "Media progress should be computed using only the media_progress_duration relative to the media total length. This value must be between `[0, 1.0]` inclusive. If this is not a playback or the progress cannot be computed (e.g. ongoing livestream), this field should be unset.", + "id": { + "description": "The unique ID to represent the record.", + "type": "string" + }, + "score": { + "description": "The score of this record based on the given query and selected model.", "format": "float", "type": "number" + }, + "title": { + "description": "The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaOutputResult": { - "description": "Output result that stores the information about where the exported data is stored.", - "id": "GoogleCloudDiscoveryengineV1alphaOutputResult", + "GoogleCloudDiscoveryengineV1alphaRecommendRequest": { + "description": "Request message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendRequest", "properties": { - "bigqueryResult": { - "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", - "description": "The BigQuery location where the result is stored." + "filter": { + "description": "Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY(\"Red\", \"Blue\") OR filter_tags: ANY(\"Hot\", \"Cold\"))` * `(filter_tags: ANY(\"Red\", \"Blue\")) AND NOT (filter_tags: ANY(\"Green\"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY(\"en\", \"es\")) AND NOT (categories: ANY(\"Movie\")) * (available: true) AND (launguage: ANY(\"en\", \"es\")) OR (categories: ANY(\"Movie\")) If your filter blocks all results, the API returns generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to `true` in RecommendRequest.params to receive empty results instead. Note that the API never returns Documents with `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service chooses a reasonable default. The maximum allowed value is 100. Values above 100 are set to 100.", + "format": "int32", + "type": "integer" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to `true`, the associated Document object is returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation score corresponding to each returned Document is set in RecommendResponse.RecommendationResult.metadata. The given score indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to `false`, the service returns generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` This gives request-level control and adjusts recommendation results based on Document category. * `attributeFilteringSyntax`: Boolean. False by default. If set to true, the `filter` field is interpreted according to the new, attribute-based syntax.", + "type": "object" + }, + "userEvent": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent", + "description": "Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "validateOnly": { + "description": "Use validate only mode for this recommendation query. If set to `true`, a fake model is used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult": { - "description": "A BigQuery output result.", - "id": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", + "GoogleCloudDiscoveryengineV1alphaRecommendResponse": { + "description": "Response message for Recommend method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponse", "properties": { - "datasetId": { - "description": "The ID of a BigQuery Dataset.", + "attributionToken": { + "description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", "type": "string" }, - "tableId": { - "description": "The ID of a BigQuery Table.", - "type": "string" + "missingIds": { + "description": "IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.", + "items": { + "type": "string" + }, + "type": "array" + }, + "results": { + "description": "A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult" + }, + "type": "array" + }, + "validateOnly": { + "description": "True if RecommendRequest.validate_only was set.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPageInfo": { - "description": "Detailed page information.", - "id": "GoogleCloudDiscoveryengineV1alphaPageInfo", + "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult": { + "description": "RecommendationResult represents a generic recommendation result with associated metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult", "properties": { - "pageCategory": { - "description": "The most specific category associated with a category page. To represent full path of category, use '\u003e' sign to separate different hierarchies. If '\u003e' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: `\"pageCategory\" : \"Sales \u003e 2017 Black Friday Deals\"`. Required for `view-category-page` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "type": "string" - }, - "pageviewId": { - "description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageview_id` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", - "type": "string" + "document": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", + "description": "Set if `returnDocument` is set to true in RecommendRequest.params." }, - "referrerUri": { - "description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. However, some browser privacy restrictions may cause this field to be empty.", + "id": { + "description": "Resource ID of the recommended Document.", "type": "string" }, - "uri": { - "description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", - "type": "string" + "metadata": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional Document metadata or annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPanelInfo": { - "description": "Detailed panel information associated with a user event.", - "id": "GoogleCloudDiscoveryengineV1alphaPanelInfo", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", "properties": { - "displayName": { - "description": "The display name of the panel.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "panelId": { - "description": "Required. The panel ID.", - "type": "string" + "invalidUris": { + "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", + "items": { + "type": "string" + }, + "type": "array" }, - "panelPosition": { - "description": "The ordered position of the panel, if shown to the user with other panels. If set, then total_panels must also be set.", + "pendingCount": { + "description": "Total number of URIs that have yet to be crawled.", "format": "int32", "type": "integer" }, - "totalPanels": { - "description": "The total number of panels, including this one, shown to the user. Must be set if panel_position is set.", + "quotaExceededCount": { + "description": "Total number of URIs that were rejected due to insufficient indexing resources.", + "format": "int32", + "type": "integer" + }, + "successCount": { + "description": "Total number of URIs that have been crawled so far.", + "format": "int32", + "type": "integer" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + }, + "validUrisCount": { + "description": "Total number of unique URIs in the request that are not in invalid_uris.", "format": "int32", "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest": { - "description": "Request for pausing training of an engine.", - "id": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest", - "properties": {}, + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest": { + "description": "Request message for SiteSearchEngineService.RecrawlUris method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest", + "properties": { + "uris": { + "description": "Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPrincipal": { - "description": "Principal identifier of a user or a group.", - "id": "GoogleCloudDiscoveryengineV1alphaPrincipal", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { + "description": "Response message for SiteSearchEngineService.RecrawlUris method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", "properties": { - "groupId": { - "description": "Group identifier. For Google Workspace user account, group_id should be the google workspace group email. For non-google identity provider user account, group_id is the mapped group identifier configured during the workforcepool config.", - "type": "string" + "failedUris": { + "description": "URIs that were not crawled before the LRO terminated.", + "items": { + "type": "string" + }, + "type": "array" }, - "userId": { - "description": "User identifier. For Google Workspace user account, user_id should be the google workspace user email. For non-google identity provider user account, user_id is the mapped user identifier configured during the workforcepool config.", - "type": "string" + "failureSamples": { + "description": "Details for a sample of up to 10 `failed_uris`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaProcessedDocument": { - "description": "Document captures all raw metadata information of items to be recommended or searched.", - "id": "GoogleCloudDiscoveryengineV1alphaProcessedDocument", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { + "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", "properties": { - "document": { - "description": "Required. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.", - "type": "string" + "failureReasons": { + "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" + }, + "type": "array" }, - "jsonData": { - "description": "The JSON string representation of the processed document.", + "uri": { + "description": "URI that failed to be crawled.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaProject": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1alphaProject", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { + "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, + "corpusType": { + "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", + "enum": [ + "CORPUS_TYPE_UNSPECIFIED", + "DESKTOP", + "MOBILE" + ], + "enumDescriptions": [ + "Default value.", + "Denotes a crawling attempt for the desktop version of a page.", + "Denotes a crawling attempt for the mobile version of a page." + ], "type": "string" }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, + "errorMessage": { + "description": "Reason why the URI was not crawled.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaReply": { + "description": "Defines a reply message to user.", + "id": "GoogleCloudDiscoveryengineV1alphaReply", + "properties": { + "references": { + "deprecated": true, + "description": "References in the reply.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaReplyReference" + }, + "type": "array" }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + "reply": { + "deprecated": true, + "description": "DEPRECATED: use `summary` instead. Text reply.", "type": "string" }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms" - }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" + "summary": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", + "description": "Summary based on search results." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms", + "GoogleCloudDiscoveryengineV1alphaReplyReference": { + "deprecated": true, + "description": "Defines reference in reply.", + "id": "GoogleCloudDiscoveryengineV1alphaReplyReference", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", - "type": "string" - }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", + "anchorText": { + "description": "Anchor text.", "type": "string" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", - "type": "string" + "end": { + "description": "Anchor text end index.", + "format": "int32", + "type": "integer" }, - "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", - "enum": [ - "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" - ], - "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." - ], - "type": "string" + "start": { + "description": "Anchor text start index.", + "format": "int32", + "type": "integer" }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "uri": { + "description": "URI link reference.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest": { - "description": "Request for ProjectService.ProvisionProject method.", - "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest", + "GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest": { + "description": "Request for ReportConsentChange method.", + "id": "GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest", "properties": { - "acceptDataUseTerms": { - "description": "Required. Set to `true` to specify that caller has read and would like to give consent to the [Terms for data use](https://cloud.google.com/retail/data-use-terms).", - "type": "boolean" + "consentChangeAction": { + "description": "Required. Whether customer decides to accept or decline service term. At this moment, only accept action is supported.", + "enum": [ + "CONSENT_CHANGE_ACTION_UNSPECIFIED", + "ACCEPT" + ], + "enumDescriptions": [ + "Invalid action, user must specify accept/decline", + "User accepts service terms." + ], + "type": "string" }, - "dataUseTermsVersion": { - "description": "Required. The version of the [Terms for data use](https://cloud.google.com/retail/data-use-terms) that caller has read and would like to give consent to. Acceptable version is `2022-11-23`, and this may change over time.", + "serviceTermId": { + "description": "Required. The unique identifier of the terms of service to update. Available term ids: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this service term id, the acceptable service_term_version to provide is `2022-11-23`.", + "type": "string" + }, + "serviceTermVersion": { + "description": "Required. The version string of the terms of service to update.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaRequirement": { + "description": "A data requirement.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirement", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition for evaluating the requirement result. Variables in the expression should be provided by `metrics_bindings` or `threshold_bindings`. Where `metrics_bindings` are used for computed metrics and `threshold_bindings` are used to define thresholds for corresponding `metric_bindings`." + }, + "description": { + "description": "The description of the requirement.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "displayName": { + "description": "The name of the requirement.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest": { - "description": "Request message for CompletionService.PurgeCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse": { - "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + }, + "metricBindings": { + "description": "A list of the metric bindings to be used in `condition`.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding" }, "type": "array" }, - "purgeSucceeded": { - "description": "Whether the completion suggestions were successfully purged.", - "type": "boolean" + "thresholdBindings": { + "description": "A list of threshold bindings to be used in `condition`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding" + }, + "type": "array" + }, + "type": { + "description": "The requirement type, used as an identifier. Must be unique. The type should prefix with service name to avoid possible collision. It's encouraged to use natural hierarchical grouping for similar requirements. Examples: * `library.googleapis.com/books/min_available_books` * `discoveryengine.googleapis.com/media_rec/recommended_for_you/conversion_rate`", + "type": "string" + }, + "violationSamplesBindings": { + "description": "A list of the metric bindings to be used in `condition`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding": { + "description": "Specifies a metrics query and bind its result to a variable which will be used in the `condition`.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "category": { + "description": "The category of the metric's target resource. Example: \"Events\"", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "description": { + "description": "Human readable description of the corresponding metric filter.", "type": "string" }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", + "metricFilter": { + "description": "The filter string used for metrics query. Example: \"metric.type = \\\"discoveryengine.googleapis.com/events/day_count\\\" AND \" \"metric.conditions.time_range = \\\"NINETY_DAYS\\\"\"", "type": "string" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", + "resourceType": { + "description": "The resource being monitored for the metric.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "variableId": { + "description": "The variable id to be referenced in `condition`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest": { - "description": "Request message for DocumentService.PurgeDocuments method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest", + "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding": { + "description": "Specifies a multi-level threshold to apply to apply to a `metric_bindings` in the `condition` CEL expression.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", - "description": "The desired location of errors incurred during the purge." + "blockingThreshold": { + "description": "Threshold to trigger a blocking failure. If not met, the requirement will evaluate as a `FAILURE`.", + "format": "double", + "type": "number" }, - "filter": { - "description": "Required. Filter matching documents to purge. Only currently supported value is `*` (all items).", + "description": { + "description": "Human readable description of the corresponding threshold and sub-requirement.", "type": "string" }, - "force": { - "description": "Actually performs the purge. If `force` is set to false, return the expected purge count without deleting any documents.", - "type": "boolean" + "variableId": { + "description": "The variable id to be referenced in `condition`. Must be unique across all `metric_bindings` and `threshold_bindings`.", + "type": "string" }, - "gcsSource": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGcsSource", - "description": "Cloud Storage location for the input content. Supported `data_schema`: * `document_id`: One valid Document.id per line." + "warningThreshold": { + "description": "Threshold to trigger a warning. If not met, the requirement will evaluate as a `WARNING`.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding": { + "description": "Specifies a samples query and bind its result to a variable which will be used in the `condition`.", + "id": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", + "description": { + "description": "Description of this sample binding. Used by the UI to render user friendly descriptions for each requirement condition. Should be less than 128 characters long.", "type": "string" }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", - "items": { - "type": "string" - }, - "type": "array" + "sampleFilter": { + "description": "The filter string used for samples query. Example: \"sample.type = \\\"retail.googleapis.com/user_event\\\" AND \" \"sample.labels.event_type = \\\"PURCHASE\\\" \"", + "type": "string" + }, + "variableId": { + "description": "The variable id to be referenced in `condition`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig": { - "description": "Configuration of destination for Purge related errors.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig", - "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for purge errors. This must be an empty, existing Cloud Storage directory. Purge errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", - "type": "string" - } - }, + "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest": { + "description": "Request for resuming training of an engine.", + "id": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaSampleQuery": { + "description": "Sample Query captures metadata to be used for evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaSampleQuery", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. Timestamp the SampleQuery was created at.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "name": { + "description": "Immutable. The full resource name of the sample query, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "queryEntry": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry", + "description": "The query entry." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest": { - "description": "Request message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest", - "properties": {}, + "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry": { + "description": "Query Entry captures metadata to be used for search evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry", + "properties": { + "query": { + "description": "Required. The query.", + "type": "string" + }, + "targets": { + "description": "List of targets for the query.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget" + }, + "type": "array" + } + }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget": { + "description": "Defines the parameters of the query's expected outcome.", + "id": "GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "pageNumbers": { + "description": "Expected page numbers of the target. Each page number must be non negative.", "items": { - "$ref": "GoogleRpcStatus" + "format": "int32", + "type": "integer" }, "type": "array" }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "score": { + "description": "Relevance score of the target.", + "format": "double", + "type": "number" + }, + "uri": { + "description": "Expected uri of the target. This field must be a UTF-8 encoded string with a length limit of 2048 characters. Example of valid uris: `https://example.com/abc`, `gcs://example/example.pdf`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { - "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaSampleQuerySet": { + "description": "A SampleQuerySet is the parent resource of SampleQuery, and contains the configurations shared by all SampleQuery under it.", + "id": "GoogleCloudDiscoveryengineV1alphaSampleQuerySet", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. Timestamp the SampleQuerySet was created at.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "description": { + "description": "The description of the SampleQuerySet.", "type": "string" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", + "displayName": { + "description": "Required. The sample query set display name. This field must be a UTF-8 encoded string with a length limit of 128 characters.", "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" - }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest": { - "description": "Request message for PurgeUserEvents method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest", - "properties": { - "filter": { - "description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `userPseudoId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType: `eventType = \"search\"` * Deleting all events for a specific visitor: `userPseudoId = \"visitor1024\"` * Deleting all events inside a DataStore: `*` The filtering fields are assumed to have an implicit AND.", + "name": { + "description": "Immutable. The full resource name of the SampleQuerySet, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" - }, - "force": { - "description": "The `force` field is currently not supported. Purge user event requests will permanently delete all purgeable events. Once the development is complete: If `force` is set to false, the method will return the expected purge count without deleting any user events. This field will default to false if not included in the request.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaSchema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1alphaSchema", "properties": { - "purgeCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", + "fieldConfigs": { + "description": "Output only. Configurations for fields of the schema.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" + }, + "readOnly": true, + "type": "array" + }, + "jsonSchema": { + "description": "The JSON representation of the schema.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaQuery": { - "description": "Defines a user inputed query.", - "id": "GoogleCloudDiscoveryengineV1alphaQuery", + "GoogleCloudDiscoveryengineV1alphaSearchInfo": { + "description": "Detailed search information.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchInfo", "properties": { - "queryId": { - "description": "Unique Id for the query.", + "offset": { + "description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" }, - "text": { - "description": "Plain text.", + "searchQuery": { + "description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At least one of search_query or PageInfo.page_category is required for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRankRequest": { - "description": "Request message for RankService.Rank method.", - "id": "GoogleCloudDiscoveryengineV1alphaRankRequest", + "GoogleCloudDiscoveryengineV1alphaSearchRequest": { + "description": "Request message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequest", "properties": { - "ignoreRecordDetailsInResponse": { - "description": "If true, the response will contain only record ID and score. By default, it is false, the response will contain record details.", - "type": "boolean" + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" }, - "model": { - "description": "The identifier of the model to use. It is one of: * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input token size 512. It is set to `semantic-ranker-512@latest` by default if unspecified.", + "branch": { + "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", "type": "string" }, - "query": { - "description": "The query to use.", + "canonicalFilter": { + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", "type": "string" }, - "records": { - "description": "Required. A list of records to rank. At most 200 records to rank.", + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "A specification for configuring the behavior of content search." + }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs. If set, it has higher priority than the configs set in ServingConfig.custom_fine_tuning_spec." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRankingRecord" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" }, "type": "array" }, - "topN": { - "description": "The number of results to return. If this is unset or no bigger than zero, returns all results.", - "format": "int32", - "type": "integer" + "embeddingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", + "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaRankResponse": { - "description": "Response message for RankService.Rank method.", - "id": "GoogleCloudDiscoveryengineV1alphaRankResponse", - "properties": { - "records": { - "description": "A list of records sorted by descending score.", + "facetSpecs": { + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRankingRecord" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaRankingRecord": { - "description": "Record message for RankService.Rank method.", - "id": "GoogleCloudDiscoveryengineV1alphaRankingRecord", - "properties": { - "content": { - "description": "The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.", - "type": "string" }, - "id": { - "description": "The unique ID to represent the record.", + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" }, - "score": { - "description": "The score of this record based on the given query and selected model.", - "format": "float", - "type": "number" + "imageQuery": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", + "description": "Raw image query." }, - "title": { - "description": "The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.", + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaRecommendRequest": { - "description": "Request message for Recommend method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecommendRequest", - "properties": { - "filter": { - "description": "Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: * `(filter_tags: ANY(\"Red\", \"Blue\") OR filter_tags: ANY(\"Hot\", \"Cold\"))` * `(filter_tags: ANY(\"Red\", \"Blue\")) AND NOT (filter_tags: ANY(\"Green\"))` If `attributeFilteringSyntax` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (launguage: ANY(\"en\", \"es\")) AND NOT (categories: ANY(\"Movie\")) * (available: true) AND (launguage: ANY(\"en\", \"es\")) OR (categories: ANY(\"Movie\")) If your filter blocks all results, the API returns generic (unfiltered) popular Documents. If you only want results strictly matching the filters, set `strictFiltering` to `true` in RecommendRequest.params to receive empty results instead. Note that the API never returns Documents with `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices.", + }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, + "offset": { + "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" }, "pageSize": { - "description": "Maximum number of results to return. Set this property to the number of recommendation results needed. If zero, the service chooses a reasonable default. The maximum allowed value is 100. Values above 100 are set to 100.", + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", "type": "integer" }, + "pageToken": { + "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + }, "params": { "additionalProperties": { "type": "any" }, - "description": "Additional domain specific parameters for the recommendations. Allowed values: * `returnDocument`: Boolean. If set to `true`, the associated Document object is returned in RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. If set to true, the recommendation score corresponding to each returned Document is set in RecommendResponse.RecommendationResult.metadata. The given score indicates the probability of a Document conversion given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to `false`, the service returns generic (unfiltered) popular Documents instead of empty if your filter blocks all recommendation results. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` This gives request-level control and adjusts recommendation results based on Document category. * `attributeFilteringSyntax`: Boolean. False by default. If set to true, the `filter` field is interpreted according to the new, attribute-based syntax.", + "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", "type": "object" }, - "userEvent": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent", - "description": "Required. Context about the user, what they are looking at and what action they took to trigger the Recommend request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.user_pseudo_id to a random unique ID and leave UserEvent.user_info.user_id unset." + "query": { + "description": "Raw search query.", + "type": "string" + }, + "queryExpansionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", + "description": "The query expansion specification that specifies the conditions under which query expansion occurs." + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "type": "string" + }, + "regionCode": { + "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" + }, + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + }, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "type": "string" + }, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "type": "string" + }, + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." + }, + "spellCorrectionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", + "description": "The spell correction specification that specifies the mode under which spell correction takes effect." + }, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." }, "userLabels": { "additionalProperties": { "type": "string" }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", "type": "object" }, - "validateOnly": { - "description": "Use validate only mode for this recommendation query. If set to `true`, a fake model is used that returns arbitrary Document IDs. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", - "type": "boolean" + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec": { + "description": "Boost specification to boost certain documents.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "properties": { + "conditionBoostSpecs": { + "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec": { + "description": "Boost applies to documents which match a condition.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec", + "properties": { + "boost": { + "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", + "format": "float", + "type": "number" + }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, + "condition": { + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecommendResponse": { - "description": "Response message for Recommend method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", "properties": { - "attributionToken": { - "description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", + "attributeType": { + "description": "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]`. For example, `5D`, `3DT12H30M`, `T24H`." + ], "type": "string" }, - "missingIds": { - "description": "IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.", + "controlPoints": { + "description": "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": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" }, "type": "array" }, - "results": { - "description": "A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult" - }, - "type": "array" + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" }, - "validateOnly": { - "description": "True if RecommendRequest.validate_only was set.", - "type": "boolean" + "interpolationType": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult": { - "description": "RecommendationResult represents a generic recommendation result with associated metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", "properties": { - "document": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", - "description": "Set if `returnDocument` is set to true in RecommendRequest.params." - }, - "id": { - "description": "Resource ID of the recommended Document.", + "attributeValue": { + "description": "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" }, - "metadata": { - "additionalProperties": { - "type": "any" - }, - "description": "Additional Document metadata or annotations. Possible values: * `score`: Recommendation score in double value. Is set if `returnScore` is set to true in RecommendRequest.params.", - "type": "object" + "boostAmount": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], "type": "string" }, - "invalidUris": { - "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", - "items": { - "type": "string" - }, - "type": "array" + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." }, - "pendingCount": { - "description": "Total number of URIs that have yet to be crawled.", + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", + "properties": { + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", "format": "int32", "type": "integer" }, - "quotaExceededCount": { - "description": "Total number of URIs that were rejected due to insufficient indexing resources.", + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", + "properties": { + "maxExtractiveAnswerCount": { + "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", "format": "int32", "type": "integer" }, - "successCount": { - "description": "Total number of URIs that have been crawled so far.", + "maxExtractiveSegmentCount": { + "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", "format": "int32", "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" }, - "validUrisCount": { - "description": "Total number of unique URIs in the request that are not in invalid_uris.", + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", "format": "int32", "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest": { - "description": "Request message for SiteSearchEngineService.RecrawlUris method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", "properties": { - "uris": { - "description": "Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in `site_search_engine`.", - "items": { - "type": "string" - }, - "type": "array" + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" + }, + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" + }, + "returnSnippet": { + "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { - "description": "Response message for SiteSearchEngineService.RecrawlUris method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", "properties": { - "failedUris": { - "description": "URIs that were not crawled before the LRO terminated.", - "items": { - "type": "string" - }, - "type": "array" + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", + "type": "boolean" }, - "failureSamples": { - "description": "Details for a sample of up to 10 `failed_uris`.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" - }, - "type": "array" + "ignoreNonSummarySeekingQuery": { + "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", + "type": "boolean" + }, + "languageCode": { + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", + "type": "string" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { - "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", - "properties": { - "failureReasons": { - "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" - }, - "type": "array" - }, - "uri": { - "description": "URI that failed to be crawled.", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "properties": { + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { - "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { - "corpusType": { - "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", - "enum": [ - "CORPUS_TYPE_UNSPECIFIED", - "DESKTOP", - "MOBILE" - ], - "enumDescriptions": [ - "Default value.", - "Denotes a crawling attempt for the desktop version of a page.", - "Denotes a crawling attempt for the mobile version of a page." - ], + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", "type": "string" - }, - "errorMessage": { - "description": "Reason why the URI was not crawled.", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec": { + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", + "properties": { + "dataStore": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaReply": { - "description": "Defines a reply message to user.", - "id": "GoogleCloudDiscoveryengineV1alphaReply", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec": { + "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", "properties": { - "references": { - "deprecated": true, - "description": "References in the reply.", + "embeddingVectors": { + "description": "The embedding vector used for retrieval. Limit to 1.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaReplyReference" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector" }, "type": "array" - }, - "reply": { - "deprecated": true, - "description": "DEPRECATED: use `summary` instead. Text reply.", - "type": "string" - }, - "summary": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", - "description": "Summary based on search results." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaReplyReference": { - "deprecated": true, - "description": "Defines reference in reply.", - "id": "GoogleCloudDiscoveryengineV1alphaReplyReference", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector": { + "description": "Embedding vector.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector", "properties": { - "anchorText": { - "description": "Anchor text.", + "fieldPath": { + "description": "Embedding field path in schema.", "type": "string" }, - "end": { - "description": "Anchor text end index.", - "format": "int32", - "type": "integer" - }, - "start": { - "description": "Anchor text start index.", - "format": "int32", - "type": "integer" - }, - "uri": { - "description": "URI link reference.", - "type": "string" + "vector": { + "description": "Query embedding vector.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest": { - "description": "Request for ReportConsentChange method.", - "id": "GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest", + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec": { + "description": "A facet specification to perform faceted search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec", "properties": { - "consentChangeAction": { - "description": "Required. Whether customer decides to accept or decline service term. At this moment, only accept action is supported.", - "enum": [ - "CONSENT_CHANGE_ACTION_UNSPECIFIED", - "ACCEPT" - ], - "enumDescriptions": [ - "Invalid action, user must specify accept/decline", - "User accepts service terms." - ], - "type": "string" + "enableDynamicPosition": { + "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", + "type": "boolean" }, - "serviceTermId": { - "description": "Required. The unique identifier of the terms of service to update. Available term ids: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this service term id, the acceptable service_term_version to provide is `2022-11-23`.", - "type": "string" + "excludedFilterKeys": { + "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "type": "string" + }, + "type": "array" }, - "serviceTermVersion": { - "description": "Required. The version string of the terms of service to update.", - "type": "string" + "facetKey": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", + "description": "Required. The facet key specification." + }, + "limit": { + "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRequirement": { - "description": "A data requirement.", - "id": "GoogleCloudDiscoveryengineV1alphaRequirement", + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey": { + "description": "Specifies how a facet is computed.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", "properties": { - "condition": { - "$ref": "GoogleTypeExpr", - "description": "The condition for evaluating the requirement result. Variables in the expression should be provided by `metrics_bindings` or `threshold_bindings`. Where `metrics_bindings` are used for computed metrics and `threshold_bindings` are used to define thresholds for corresponding `metric_bindings`." - }, - "description": { - "description": "The description of the requirement.", - "type": "string" - }, - "displayName": { - "description": "The name of the requirement.", - "type": "string" + "caseInsensitive": { + "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", + "type": "boolean" }, - "metricBindings": { - "description": "A list of the metric bindings to be used in `condition`.", + "contains": { + "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding" + "type": "string" }, "type": "array" }, - "thresholdBindings": { - "description": "A list of threshold bindings to be used in `condition`.", + "intervals": { + "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding" + "$ref": "GoogleCloudDiscoveryengineV1alphaInterval" }, "type": "array" }, - "type": { - "description": "The requirement type, used as an identifier. Must be unique. The type should prefix with service name to avoid possible collision. It's encouraged to use natural hierarchical grouping for similar requirements. Examples: * `library.googleapis.com/books/min_available_books` * `discoveryengine.googleapis.com/media_rec/recommended_for_you/conversion_rate`", + "key": { + "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", "type": "string" }, - "violationSamplesBindings": { - "description": "A list of the metric bindings to be used in `condition`.", + "orderBy": { + "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", + "type": "string" + }, + "prefixes": { + "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding" + "type": "string" + }, + "type": "array" + }, + "restrictedValues": { + "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding": { - "description": "Specifies a metrics query and bind its result to a variable which will be used in the `condition`.", - "id": "GoogleCloudDiscoveryengineV1alphaRequirementMetricBinding", + "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery": { + "description": "Specifies the image query input.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", "properties": { - "category": { - "description": "The category of the metric's target resource. Example: \"Events\"", - "type": "string" - }, - "description": { - "description": "Human readable description of the corresponding metric filter.", - "type": "string" - }, - "metricFilter": { - "description": "The filter string used for metrics query. Example: \"metric.type = \\\"discoveryengine.googleapis.com/events/day_count\\\" AND \" \"metric.conditions.time_range = \\\"NINETY_DAYS\\\"\"", - "type": "string" - }, - "resourceType": { - "description": "The resource being monitored for the metric.", - "type": "string" - }, - "variableId": { - "description": "The variable id to be referenced in `condition`.", + "imageBytes": { + "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding": { - "description": "Specifies a multi-level threshold to apply to apply to a `metric_bindings` in the `condition` CEL expression.", - "id": "GoogleCloudDiscoveryengineV1alphaRequirementThresholdBinding", + "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", "properties": { - "blockingThreshold": { - "description": "Threshold to trigger a blocking failure. If not met, the requirement will evaluate as a `FAILURE`.", - "format": "double", - "type": "number" - }, - "description": { - "description": "Human readable description of the corresponding threshold and sub-requirement.", + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], "type": "string" }, - "variableId": { - "description": "The variable id to be referenced in `condition`. Must be unique across all `metric_bindings` and `threshold_bindings`.", + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec": { + "description": "Specification to determine under which conditions query expansion should occur.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", + "properties": { + "condition": { + "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", + "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", + "Automatic query expansion built by the Search API." + ], "type": "string" }, - "warningThreshold": { - "description": "Threshold to trigger a warning. If not met, the requirement will evaluate as a `WARNING`.", - "format": "double", - "type": "number" + "pinUnexpandedResults": { + "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding": { - "description": "Specifies a samples query and bind its result to a variable which will be used in the `condition`.", - "id": "GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", "properties": { - "description": { - "description": "Description of this sample binding. Used by the UI to render user friendly descriptions for each requirement condition. Should be less than 128 characters long.", - "type": "string" - }, - "sampleFilter": { - "description": "The filter string used for samples query. Example: \"sample.type = \\\"retail.googleapis.com/user_event\\\" AND \" \"sample.labels.event_type = \\\"PURCHASE\\\" \"", - "type": "string" - }, - "variableId": { - "description": "The variable id to be referenced in `condition`.", + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest": { - "description": "Request for resuming training of an engine.", - "id": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSchema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1alphaSchema", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", "properties": { - "fieldConfigs": { - "description": "Output only. Configurations for fields of the schema.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" - }, - "readOnly": true, - "type": "array" - }, - "jsonSchema": { - "description": "The JSON representation of the schema.", - "type": "string" - }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", "type": "string" }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchInfo": { - "description": "Detailed search information.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchInfo", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec": { + "description": "The specification for query spell correction.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", "properties": { - "offset": { - "description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an `INVALID_ARGUMENT` is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "format": "int32", - "type": "integer" - }, - "orderBy": { - "description": "The order in which products are returned, if applicable. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "type": "string" - }, - "searchQuery": { - "description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At least one of search_query or PageInfo.page_category is required for `search` events. Other event types should not set this field. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "mode": { + "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "SUGGESTION_ONLY", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", + "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", + "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequest": { - "description": "Request message for SearchService.Search method.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequest", + "GoogleCloudDiscoveryengineV1alphaSearchResponse": { + "description": "Response message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponse", "properties": { - "boostSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", - "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + "appliedControls": { + "description": "Controls applied as part of the Control service.", + "items": { + "type": "string" + }, + "type": "array" }, - "branch": { - "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", + "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.", "type": "string" }, - "canonicalFilter": { - "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", + "correctedQuery": { + "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", "type": "string" }, - "contentSearchSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", - "description": "A specification for configuring the behavior of content search." - }, - "customFineTuningSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", - "description": "Custom fine tuning configs. If set, it has higher priority than the configs set in ServingConfig.custom_fine_tuning_spec." - }, - "dataStoreSpecs": { - "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "facets": { + "description": "Results of facets requested by user.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet" }, "type": "array" }, - "embeddingSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", - "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." - }, - "facetSpecs": { - "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "geoSearchDebugInfo": { "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo" }, "type": "array" }, - "filter": { - "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", - "type": "string" - }, - "imageQuery": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", - "description": "Raw image query." - }, - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", - "type": "string" - }, - "naturalLanguageQueryUnderstandingSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", - "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." - }, - "offset": { - "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", - "format": "int32", - "type": "integer" - }, - "orderBy": { - "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", - "type": "string" - }, - "pageSize": { - "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", - "format": "int32", - "type": "integer" - }, - "pageToken": { - "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "type": "string" - }, - "params": { - "additionalProperties": { - "type": "any" - }, - "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", - "type": "object" - }, - "query": { - "description": "Raw search query.", - "type": "string" - }, - "queryExpansionSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", - "description": "The query expansion specification that specifies the conditions under which query expansion occurs." - }, - "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", - "type": "string" - }, - "regionCode": { - "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" + "guidedSearchResult": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult", + "description": "Guided search result." }, - "searchAsYouTypeSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", - "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." + "naturalLanguageQueryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", + "description": "Natural language query understanding information for the returned results." }, - "session": { - "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "nextPageToken": { + "description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", "type": "string" }, - "sessionSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", - "description": "Session specification. Can be used only when `session` is set." - }, - "spellCorrectionSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", - "description": "The spell correction specification that specifies the mode under which spell correction takes effect." + "queryExpansionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo", + "description": "Query expansion information for the returned results." }, - "userInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", - "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." + "redirectUri": { + "description": "The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.", + "type": "string" }, - "userLabels": { - "additionalProperties": { - "type": "string" + "results": { + "description": "A list of matched documents. The order represents the ranking.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" }, - "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", - "type": "object" + "type": "array" }, - "userPseudoId": { - "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "type": "string" + "sessionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", + "description": "Session information. Only set if SearchRequest.session is provided. See its description for more details." + }, + "summary": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", + "description": "A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set." + }, + "totalSize": { + "description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec": { - "description": "Boost specification to boost certain documents.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet": { + "description": "A facet result.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet", "properties": { - "conditionBoostSpecs": { - "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", + "dynamicFacet": { + "description": "Whether the facet is dynamically generated.", + "type": "boolean" + }, + "key": { + "description": "The key for this facet. For example, `\"colors\"` or `\"price\"`. It matches SearchRequest.FacetSpec.FacetKey.key.", + "type": "string" + }, + "values": { + "description": "The facet values for this field.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec": { - "description": "Boost applies to documents which match a condition.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue": { + "description": "A facet value which contains value names and their count.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue", "properties": { - "boost": { - "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", - "format": "float", - "type": "number" + "count": { + "description": "Number of items that have this facet value.", + "format": "int64", + "type": "string" }, - "boostControlSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", - "description": "Complex specification for custom ranking based on customer defined attribute value." + "interval": { + "$ref": "GoogleCloudDiscoveryengineV1alphaInterval", + "description": "Interval value for a facet, such as 10, 20) for facet \"price\". It matches [SearchRequest.FacetSpec.FacetKey.intervals." }, - "condition": { - "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", + "value": { + "description": "Text value of a facet, such as \"Black\" for facet \"colors\".", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { - "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo": { + "description": "Debug information specifically related to forward geocoding issues arising from Geolocation Search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo", "properties": { - "attributeType": { - "description": "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]`. For example, `5D`, `3DT12H30M`, `T24H`." - ], - "type": "string" - }, - "controlPoints": { - "description": "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" - }, - "type": "array" - }, - "fieldName": { - "description": "The name of the field whose value will be used to determine the boost amount.", + "errorMessage": { + "description": "The error produced.", "type": "string" }, - "interpolationType": { - "description": "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." - ], + "originalAddressQuery": { + "description": "The address from which forward geocoding ingestion produced issues.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { - "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult": { + "description": "Guided search result. The guided search helps user to refine the search results and narrow down to the real needs from a broaded search results.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult", "properties": { - "attributeValue": { - "description": "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" + "followUpQuestions": { + "description": "Suggested follow-up questions.", + "items": { + "type": "string" + }, + "type": "array" }, - "boostAmount": { - "description": "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" + "refinementAttributes": { + "description": "A list of ranked refinement attributes.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec": { - "description": "A specification for configuring the behavior of content search.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute": { + "description": "Useful attribute for search result refinements.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute", "properties": { - "chunkSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", - "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" - }, - "extractiveContentSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", - "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." - }, - "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", - "enum": [ - "SEARCH_RESULT_MODE_UNSPECIFIED", - "DOCUMENTS", - "CHUNKS" - ], - "enumDescriptions": [ - "Default value.", - "Returns documents in the search result.", - "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." - ], + "attributeKey": { + "description": "Attribute key used to refine the results. For example, `\"movie_type\"`.", "type": "string" }, - "snippetSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", - "description": "If `snippetSpec` is not specified, snippets are not included in the search response." - }, - "summarySpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", - "description": "If `summarySpec` is not specified, summaries are not included in the search response." + "attributeValue": { + "description": "Attribute value used to refine the results. For example, `\"drama\"`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec": { - "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo": { + "description": "Information describing what natural language understanding was done on the input query.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", "properties": { - "numNextChunks": { - "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", - "format": "int32", - "type": "integer" + "extractedFilters": { + "description": "The filters that were extracted from the input query.", + "type": "string" }, - "numPreviousChunks": { - "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", - "format": "int32", - "type": "integer" + "rewrittenQuery": { + "description": "Rewritten input query minus the extracted filters.", + "type": "string" + }, + "structuredExtractedFilter": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", + "description": "The filters that were extracted from the input query represented in a structured form." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec": { - "description": "A specification for configuring the extractive content in a search response.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter": { + "description": "The filters that were extracted from the input query represented in a structured form.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", "properties": { - "maxExtractiveAnswerCount": { - "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", - "format": "int32", - "type": "integer" - }, - "maxExtractiveSegmentCount": { - "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", - "format": "int32", - "type": "integer" - }, - "numNextSegments": { - "description": "Return at most `num_next_segments` segments after each selected segments.", - "format": "int32", - "type": "integer" - }, - "numPreviousSegments": { - "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", - "format": "int32", - "type": "integer" - }, - "returnExtractiveSegmentScore": { - "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", - "type": "boolean" + "expression": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "description": "The expression denoting the filter that was extracted from the input query in a structured form. It can be a simple expression denoting a single string, numerical or geolocation constraint or a compound expression which is a combination of multiple expressions connected using logical (OR and AND) operators." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec": { - "description": "A specification for configuring snippets in a search response.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", - "properties": { - "maxSnippetCount": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", - "format": "int32", - "type": "integer" - }, - "referenceOnly": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", - "type": "boolean" - }, - "returnSnippet": { - "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", - "type": "boolean" + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression": { + "description": "Logical `And` operator.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "properties": { + "expressions": { + "description": "The expressions that were ANDed together.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec": { - "description": "A specification for configuring a summary returned in a search response.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression": { + "description": "The expression denoting the filter that was extracted from the input query.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", "properties": { - "ignoreAdversarialQuery": { - "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", - "type": "boolean" - }, - "ignoreNonSummarySeekingQuery": { - "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", - "type": "boolean" - }, - "includeCitations": { - "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", - "type": "boolean" - }, - "languageCode": { - "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", - "type": "string" + "andExpr": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", + "description": "Logical \"And\" compound operator connecting multiple expressions." }, - "modelPromptSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", - "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + "geolocationConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "description": "Geolocation constraint expression." }, - "modelSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", - "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + "numberConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "description": "Numerical constraint expression." }, - "summaryResultCount": { - "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", - "format": "int32", - "type": "integer" + "orExpr": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "description": "Logical \"Or\" compound operator connecting multiple expressions." }, - "useSemanticChunks": { - "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", - "type": "boolean" + "stringConstraint": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "description": "String constraint expression." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { - "description": "Specification of the prompt to use with the model.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint": { + "description": "Constraint of a geolocation field. Name of the geolocation field as defined in the schema.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", "properties": { - "preamble": { - "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", + "address": { + "description": "The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec": { - "description": "Specification of the model.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", - "properties": { - "version": { - "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", + }, + "fieldName": { + "description": "The name of the geolocation field as defined in the schema.", "type": "string" + }, + "radiusInMeters": { + "description": "The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec": { - "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint": { + "description": "Constraint expression of a number field. Example: price \u003c 100.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", "properties": { - "dataStore": { - "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", + "comparison": { + "description": "The comparison operation performed between the field value and the value specified in the constraint.", + "enum": [ + "COMPARISON_UNSPECIFIED", + "EQUALS", + "LESS_THAN_EQUALS", + "LESS_THAN", + "GREATER_THAN_EQUALS", + "GREATER_THAN" + ], + "enumDescriptions": [ + "Undefined comparison operator.", + "Denotes equality `=` operator.", + "Denotes less than or equal to `\u003c=` operator.", + "Denotes less than `\u003c` operator.", + "Denotes greater than or equal to `\u003e=` operator.", + "Denotes greater than `\u003e` operator." + ], + "type": "string" + }, + "fieldName": { + "description": "Name of the numerical field as defined in the schema.", "type": "string" + }, + "value": { + "description": "The value specified in the numerical constraint.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec": { - "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression": { + "description": "Logical `Or` operator.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", "properties": { - "embeddingVectors": { - "description": "The embedding vector used for retrieval. Limit to 1.", + "expressions": { + "description": "The expressions that were ORed together.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector": { - "description": "Embedding vector.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector", + "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint": { + "description": "Constraint expression of a string field.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", "properties": { - "fieldPath": { - "description": "Embedding field path in schema.", + "fieldName": { + "description": "Name of the string field as defined in the schema.", "type": "string" }, - "vector": { - "description": "Query embedding vector.", + "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": { - "format": "float", - "type": "number" + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec": { - "description": "A facet specification to perform faceted search.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo": { + "description": "Information describing query expansion including whether expansion has occurred.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo", "properties": { - "enableDynamicPosition": { - "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", + "expandedQuery": { + "description": "Bool describing whether query expansion has occurred.", "type": "boolean" }, - "excludedFilterKeys": { - "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", - "items": { - "type": "string" - }, - "type": "array" + "pinnedResultCount": { + "description": "Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult": { + "description": "Represents the search results.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult", + "properties": { + "chunk": { + "$ref": "GoogleCloudDiscoveryengineV1alphaChunk", + "description": "The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS." }, - "facetKey": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", - "description": "Required. The facet key specification." + "document": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", + "description": "The document data snippet in the search response. Only fields that are marked as `retrievable` are populated." }, - "limit": { - "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", - "format": "int32", - "type": "integer" + "id": { + "description": "Document.id of the searched Document.", + "type": "string" + }, + "modelScores": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDoubleList" + }, + "description": "Google provided available scores.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey": { - "description": "Specifies how a facet is computed.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo": { + "description": "Information about the session.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", "properties": { - "caseInsensitive": { - "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", - "type": "boolean" + "name": { + "description": "Name of the session. If the auto-session mode is used (when SearchRequest.session ends with \"-\"), this field holds the newly generated session name.", + "type": "string" }, - "contains": { - "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", - "items": { - "type": "string" - }, - "type": "array" + "queryId": { + "description": "Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary": { + "description": "Summary of the top N search results specified by the summary spec.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", + "properties": { + "safetyAttributes": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", + "description": "A collection of Safety Attribute categories and their associated confidence scores." }, - "intervals": { - "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", + "summarySkippedReasons": { + "description": "Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaInterval" + "enum": [ + "SUMMARY_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_SUMMARY_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION", + "LLM_ADDON_NOT_ENABLED" + ], + "enumDescriptions": [ + "Default value. The summary skipped reason is not specified.", + "The adversarial query ignored case. Only populated when SummarySpec.ignore_adversarial_query is set to `true`.", + "The non-summary seeking query ignored case. Only populated when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", + "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", + "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." + ], + "type": "string" }, "type": "array" }, - "key": { - "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", + "summaryText": { + "description": "The summary content.", "type": "string" }, - "orderBy": { - "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", + "summaryWithMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata", + "description": "Summary with metadata information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation", + "properties": { + "endIndex": { + "description": "End of the attributed segment, exclusive.", + "format": "int64", "type": "string" }, - "prefixes": { - "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", + "sources": { + "description": "Citation sources for the attributed segment.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource" }, "type": "array" }, - "restrictedValues": { - "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes/unicode.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata": { + "description": "Citation metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata", + "properties": { + "citations": { + "description": "Citations for segments.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery": { - "description": "Specifies the image query input.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource", "properties": { - "imageBytes": { - "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", + "referenceIndex": { + "description": "Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec": { - "description": "Specification to enable natural language understanding capabilities for search requests.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference": { + "description": "Document reference.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference", "properties": { - "filterExtractionCondition": { - "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", - "enum": [ - "CONDITION_UNSPECIFIED", - "DISABLED", - "ENABLED" - ], - "enumDescriptions": [ - "Server behavior defaults to Condition.DISABLED.", - "Disables NL filter extraction.", - "Enables NL filter extraction." - ], - "type": "string" - }, - "geoSearchQueryDetectionFieldNames": { - "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in Servingconfig.geo_search_query_detection_field_names.", + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec": { - "description": "Specification to determine under which conditions query expansion should occur.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", - "properties": { - "condition": { - "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", - "enum": [ - "CONDITION_UNSPECIFIED", - "DISABLED", - "AUTO" - ], - "enumDescriptions": [ - "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", - "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", - "Automatic query expansion built by the Search API." - ], + }, + "document": { + "description": "Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.", "type": "string" }, - "pinUnexpandedResults": { - "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", - "type": "boolean" + "title": { + "description": "Title of the document.", + "type": "string" + }, + "uri": { + "description": "Cloud Storage or HTTP uri for the document.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec": { - "description": "Specification for search as you type in search requests.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent", "properties": { - "condition": { - "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", - "enum": [ - "CONDITION_UNSPECIFIED", - "DISABLED", - "ENABLED" - ], - "enumDescriptions": [ - "Server behavior defaults to Condition.DISABLED.", - "Disables Search As You Type.", - "Enables Search As You Type." - ], + "content": { + "description": "Chunk textual content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec": { - "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes": { + "description": "Safety Attribute categories and their associated confidence scores.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", "properties": { - "queryId": { - "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", - "type": "string" + "categories": { + "description": "The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.", + "items": { + "type": "string" + }, + "type": "array" }, - "searchResultPersistenceCount": { - "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", - "format": "int32", - "type": "integer" + "scores": { + "description": "The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec": { - "description": "The specification for query spell correction.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", + "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata": { + "description": "Summary with metadata information.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata", "properties": { - "mode": { - "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", - "enum": [ - "MODE_UNSPECIFIED", - "SUGGESTION_ONLY", - "AUTO" - ], - "enumDescriptions": [ - "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", - "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", - "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." - ], + "citationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata", + "description": "Citation metadata for given summary." + }, + "references": { + "description": "Document References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference" + }, + "type": "array" + }, + "summary": { + "description": "Summary text with no citation information.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponse": { - "description": "Response message for SearchService.Search method.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponse", + "GoogleCloudDiscoveryengineV1alphaServingConfig": { + "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfig", "properties": { - "appliedControls": { - "description": "Controls applied as part of the Control service.", + "boostControlIds": { + "description": "Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.", "items": { "type": "string" }, "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.", + "createTime": { + "description": "Output only. ServingConfig created timestamp.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "correctedQuery": { - "description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs. If SearchRequest.custom_fine_tuning_spec is set, it has higher priority than the configs set here." + }, + "displayName": { + "description": "Required. The human readable serving config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, - "facets": { - "description": "Results of facets requested by user.", + "dissociateControlIds": { + "description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet" + "type": "string" }, "type": "array" }, - "geoSearchDebugInfo": { + "diversityLevel": { + "description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "embeddingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", + "description": "Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config." + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo" + "type": "string" }, "type": "array" }, - "guidedSearchResult": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult", - "description": "Guided search result." + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." }, - "naturalLanguageQueryUnderstandingInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", - "description": "Natural language query understanding information for the returned results." + "guidedSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", + "description": "Guided search configs." + }, + "ignoreControlIds": { + "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mediaConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", + "description": "The MediaConfig of the serving configuration." }, - "nextPageToken": { - "description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "modelId": { + "description": "The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.", "type": "string" }, - "queryExpansionInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo", - "description": "Query expansion information for the returned results." - }, - "redirectUri": { - "description": "The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.", + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", "type": "string" }, - "results": { - "description": "A list of matched documents. The order represents the ranking.", + "onewaySynonymsControlIds": { + "description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult" + "type": "string" }, "type": "array" }, - "sessionInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", - "description": "Session information. Only set if SearchRequest.session is provided. See its description for more details." + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "type": "string" }, - "summary": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", - "description": "A summary as part of the search results. This field is only returned if SearchRequest.ContentSearchSpec.summary_spec is set." + "redirectControlIds": { + "description": "IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" }, - "totalSize": { - "description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet": { - "description": "A facet result.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacet", - "properties": { - "dynamicFacet": { - "description": "Whether the facet is dynamically generated.", - "type": "boolean" + "replacementControlIds": { + "description": "Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" }, - "key": { - "description": "The key for this facet. For example, `\"colors\"` or `\"price\"`. It matches SearchRequest.FacetSpec.FacetKey.key.", + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], "type": "string" }, - "values": { - "description": "The facet values for this field.", + "synonymsControlIds": { + "description": "Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue": { - "description": "A facet value which contains value names and their count.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue", - "properties": { - "count": { - "description": "Number of items that have this facet value.", - "format": "int64", - "type": "string" - }, - "interval": { - "$ref": "GoogleCloudDiscoveryengineV1alphaInterval", - "description": "Interval value for a facet, such as 10, 20) for facet \"price\". It matches [SearchRequest.FacetSpec.FacetKey.intervals." }, - "value": { - "description": "Text value of a facet, such as \"Black\" for facet \"colors\".", + "updateTime": { + "description": "Output only. ServingConfig updated timestamp.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo": { - "description": "Debug information specifically related to forward geocoding issues arising from Geolocation Search.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo", + "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", "properties": { - "errorMessage": { - "description": "The error produced.", - "type": "string" - }, - "originalAddressQuery": { - "description": "The address from which forward geocoding ingestion produced issues.", - "type": "string" + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult": { - "description": "Guided search result. The guided search helps user to refine the search results and narrow down to the real needs from a broaded search results.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult", + "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig": { + "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", "properties": { - "followUpQuestions": { - "description": "Suggested follow-up questions.", - "items": { - "type": "string" - }, - "type": "array" + "contentFreshnessCutoffDays": { + "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", + "format": "int32", + "type": "integer" }, - "refinementAttributes": { - "description": "A list of ranked refinement attributes.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute" - }, - "type": "array" + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute": { - "description": "Useful attribute for search result refinements.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute", + "GoogleCloudDiscoveryengineV1alphaSession": { + "description": "External session proto definition.", + "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { - "attributeKey": { - "description": "Attribute key used to refine the results. For example, `\"movie_type\"`.", + "endTime": { + "description": "Output only. The time the session finished.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "attributeValue": { - "description": "Attribute value used to refine the results. For example, `\"drama\"`.", + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo": { - "description": "Information describing what natural language understanding was done on the input query.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfo", - "properties": { - "extractedFilters": { - "description": "The filters that were extracted from the input query.", + }, + "startTime": { + "description": "Output only. The time the session started.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "rewrittenQuery": { - "description": "Rewritten input query minus the extracted filters.", + "state": { + "description": "The state of the session.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS" + ], + "enumDescriptions": [ + "State is unspecified.", + "The session is currently open." + ], "type": "string" }, - "structuredExtractedFilter": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", - "description": "The filters that were extracted from the input query represented in a structured form." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter": { - "description": "The filters that were extracted from the input query represented in a structured form.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter", - "properties": { - "expression": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", - "description": "The expression denoting the filter that was extracted from the input query in a structured form. It can be a simple expression denoting a single string, numerical or geolocation constraint or a compound expression which is a combination of multiple expressions connected using logical (OR and AND) operators." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression": { - "description": "Logical `And` operator.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", - "properties": { - "expressions": { - "description": "The expressions that were ANDed together.", + "turns": { + "description": "Turns.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" + "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" }, "type": "array" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression": { - "description": "The expression denoting the filter that was extracted from the input query.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression", + "GoogleCloudDiscoveryengineV1alphaSessionTurn": { + "description": "Represents a turn, including a query from the user and a answer from service.", + "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", "properties": { - "andExpr": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression", - "description": "Logical \"And\" compound operator connecting multiple expressions." - }, - "geolocationConstraint": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", - "description": "Geolocation constraint expression." - }, - "numberConstraint": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", - "description": "Numerical constraint expression." - }, - "orExpr": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", - "description": "Logical \"Or\" compound operator connecting multiple expressions." - }, - "stringConstraint": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", - "description": "String constraint expression." + "answer": { + "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "The user query." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint": { - "description": "Constraint of a geolocation field. Name of the geolocation field as defined in the schema.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint", + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.SetUriPatternDocumentData operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata", "properties": { - "address": { - "description": "The reference address that was inferred from the input query. The proximity of the reference address to the geolocation field will be used to filter the results.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "fieldName": { - "description": "The name of the geolocation field as defined in the schema.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest": { + "description": "Request message for SiteSearchEngineService.SetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest", + "properties": { + "documentDataMap": { + "additionalProperties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + }, + "description": "Document data keyed by URI pattern. Each entry must be consistent with the Schema. For example: Schema = { \"type\": \"object\", \"properties\": { \"Categories\": { \"type\": \"array\", \"items\": { \"retrievable\": true, \"type\": \"string\" } } } document_data_map = { \"www.url1.com/*\": { \"Categories\": [\"category1\", \"category2\"] }, \"www.url2.com/*\": { \"Categories\": [\"category3\"] } }", + "type": "object" }, - "radiusInMeters": { - "description": "The radius in meters around the address. The record is returned if the location of the geolocation field is within the radius.", - "format": "float", - "type": "number" + "emptyDocumentDataMap": { + "description": "If true, clears the document data map. If true, SetUriPatternDocumentDataRequest.document_data_map must be empty.", + "type": "boolean" + }, + "schema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. If not provided, the current Schema is used. If provided, validates and updates the Schema. If validation fails, an error is returned.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint": { - "description": "Constraint expression of a number field. Example: price \u003c 100.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint", + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.SetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine": { + "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", + "id": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine", "properties": { - "comparison": { - "description": "The comparison operation performed between the field value and the value specified in the constraint.", + "name": { + "description": "The fully qualified resource name of the site search engine. Format: `projects/*/locations/*/dataStores/*/siteSearchEngine`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { + "description": "Verification information for target sites in advanced site search.", + "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "properties": { + "siteVerificationState": { + "description": "Site verification state indicating the ownership and validity.", "enum": [ - "COMPARISON_UNSPECIFIED", - "EQUALS", - "LESS_THAN_EQUALS", - "LESS_THAN", - "GREATER_THAN_EQUALS", - "GREATER_THAN" + "SITE_VERIFICATION_STATE_UNSPECIFIED", + "VERIFIED", + "UNVERIFIED", + "EXEMPTED" ], "enumDescriptions": [ - "Undefined comparison operator.", - "Denotes equality `=` operator.", - "Denotes less than or equal to `\u003c=` operator.", - "Denotes less than `\u003c` operator.", - "Denotes greater than or equal to `\u003e=` operator.", - "Denotes greater than `\u003e` operator." + "Defaults to VERIFIED.", + "Site ownership verified.", + "Site ownership pending verification or verification failed.", + "Site exempt from verification, e.g., a public website that opens to all." ], "type": "string" }, - "fieldName": { - "description": "Name of the numerical field as defined in the schema.", + "verifyTime": { + "description": "Latest site verification time.", + "format": "google-datetime", "type": "string" - }, - "value": { - "description": "The value specified in the numerical constraint.", - "format": "double", - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression": { - "description": "Logical `Or` operator.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression", + "GoogleCloudDiscoveryengineV1alphaSpannerSource": { + "description": "The Spanner source for importing data", + "id": "GoogleCloudDiscoveryengineV1alphaSpannerSource", "properties": { - "expressions": { - "description": "The expressions that were ORed together.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression" - }, - "type": "array" + "databaseId": { + "description": "Required. The database ID of the source Spanner table.", + "type": "string" + }, + "enableDataBoost": { + "description": "Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).", + "type": "boolean" + }, + "instanceId": { + "description": "Required. The instance ID of the source Spanner table.", + "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.", + "type": "string" + }, + "tableId": { + "description": "Required. The table name of the Spanner database that needs to be imported.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint": { - "description": "Constraint expression of a string field.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint", + "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry": { + "description": "Suggestion deny list entry identifying the phrase to block from suggestions and the applied operation for the phrase.", + "id": "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry", "properties": { - "fieldName": { - "description": "Name of the string field as defined in the schema.", + "blockPhrase": { + "description": "Required. Phrase to block from suggestions served. Can be maximum 125 characters.", "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": { - "type": "string" - }, - "type": "array" + "matchOperator": { + "description": "Required. The match operator to apply for this phrase. Whether to block the exact phrase, or block any suggestions containing this phrase.", + "enum": [ + "MATCH_OPERATOR_UNSPECIFIED", + "EXACT_MATCH", + "CONTAINS" + ], + "enumDescriptions": [ + "Default value. Should not be used", + "If the suggestion is an exact match to the block_phrase, then block it.", + "If the suggestion contains the block_phrase, then block it." + ], + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo": { - "description": "Information describing query expansion including whether expansion has occurred.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo", + "GoogleCloudDiscoveryengineV1alphaTargetSite": { + "description": "A target site for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", "properties": { - "expandedQuery": { - "description": "Bool describing whether query expansion has occurred.", + "exactMatch": { + "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", "type": "boolean" }, - "pinnedResultCount": { - "description": "Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.", - "format": "int64", + "failureReason": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "description": "Output only. Failure reason.", + "readOnly": true + }, + "generatedUriPattern": { + "description": "Output only. This is system-generated based on the provided_uri_pattern.", + "readOnly": true, "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult": { - "description": "Represents the search results.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult", - "properties": { - "chunk": { - "$ref": "GoogleCloudDiscoveryengineV1alphaChunk", - "description": "The chunk data in the search response if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS." }, - "document": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocument", - "description": "The document data snippet in the search response. Only fields that are marked as `retrievable` are populated." + "indexingStatus": { + "description": "Output only. Indexing status.", + "enum": [ + "INDEXING_STATUS_UNSPECIFIED", + "PENDING", + "FAILED", + "SUCCEEDED", + "DELETING" + ], + "enumDescriptions": [ + "Defaults to SUCCEEDED.", + "The target site is in the update queue and will be picked up by indexing pipeline.", + "The target site fails to be indexed.", + "The target site has been indexed.", + "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." + ], + "readOnly": true, + "type": "string" }, - "id": { - "description": "Document.id of the searched Document.", + "name": { + "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + "readOnly": true, "type": "string" }, - "modelScores": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDoubleList" - }, - "description": "Google provided available scores.", - "type": "object" + "providedUriPattern": { + "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", + "type": "string" + }, + "rootDomainUri": { + "description": "Output only. Root domain of the provided_uri_pattern.", + "readOnly": true, + "type": "string" + }, + "siteVerificationInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "description": "Output only. Site ownership and validity verification status.", + "readOnly": true + }, + "type": { + "description": "The type of the target site, e.g., whether the site is to be included or excluded.", + "enum": [ + "TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" + ], + "enumDescriptions": [ + "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", + "Include the target site.", + "Exclude the target site." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The target site's last updated time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "properties": { + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo": { - "description": "Information about the session.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSessionInfo", + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", "properties": { - "name": { - "description": "Name of the session. If the auto-session mode is used (when SearchRequest.session ends with \"-\"), this field holds the newly generated session name.", - "type": "string" - }, - "queryId": { - "description": "Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.", + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary": { - "description": "Summary of the top N search results specified by the summary spec.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummary", + "GoogleCloudDiscoveryengineV1alphaTextInput": { + "description": "Defines text input.", + "id": "GoogleCloudDiscoveryengineV1alphaTextInput", "properties": { - "safetyAttributes": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", - "description": "A collection of Safety Attribute categories and their associated confidence scores." - }, - "summarySkippedReasons": { - "description": "Additional summary-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", - "items": { - "enum": [ - "SUMMARY_SKIPPED_REASON_UNSPECIFIED", - "ADVERSARIAL_QUERY_IGNORED", - "NON_SUMMARY_SEEKING_QUERY_IGNORED", - "OUT_OF_DOMAIN_QUERY_IGNORED", - "POTENTIAL_POLICY_VIOLATION", - "LLM_ADDON_NOT_ENABLED" - ], - "enumDescriptions": [ - "Default value. The summary skipped reason is not specified.", - "The adversarial query ignored case. Only populated when SummarySpec.ignore_adversarial_query is set to `true`.", - "The non-summary seeking query ignored case. Only populated when SummarySpec.ignore_non_summary_seeking_query is set to `true`.", - "The out-of-domain query ignored case. Google skips the summary if there are no high-relevance search results. For example, the data store contains facts about company A but the user query is asking questions about company B.", - "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." - ], - "type": "string" - }, - "type": "array" + "context": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConversationContext", + "description": "Conversation context of the input." }, - "summaryText": { - "description": "The summary content.", + "input": { + "description": "Text input.", "type": "string" - }, - "summaryWithMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata", - "description": "Summary with metadata information." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation": { - "description": "Citation info for a segment.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", "properties": { - "endIndex": { - "description": "End of the attributed segment, exclusive.", - "format": "int64", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "sources": { - "description": "Citation sources for the attributed segment.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource" - }, - "type": "array" - }, - "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes/unicode.", - "format": "int64", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata": { - "description": "Citation metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest": { + "description": "Request message for SearchTuningService.TrainCustomModel method.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest", "properties": { - "citations": { - "description": "Citations for segments.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation" - }, - "type": "array" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the data ingestion and training." + }, + "gcsTrainingInput": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput", + "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" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource": { - "description": "Citation source.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput": { + "description": "Cloud Storage training data input.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput", "properties": { - "referenceIndex": { - "description": "Document reference index from SummaryWithMetadata.references. It is 0-indexed and the value will be zero if the reference_index is not set explicitly.", - "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference": { - "description": "Document reference.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", "properties": { - "chunkContents": { - "description": "List of cited chunk contents derived from document content.", + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "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": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent" + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "document": { - "description": "Required. Document.name of the document. Full resource name of the referenced document, in the format `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.", - "type": "string" + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" }, - "title": { - "description": "Title of the document.", + "modelName": { + "description": "Fully qualified name of the CustomTuningModel.", "type": "string" }, - "uri": { - "description": "Cloud Storage or HTTP uri for the document.", + "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" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent": { - "description": "Chunk content.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent", + "GoogleCloudDiscoveryengineV1alphaTransactionInfo": { + "description": "A transaction represents the entire purchase transaction.", + "id": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", "properties": { - "content": { - "description": "Chunk textual content.", + "cost": { + "description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "currency": { + "description": "Required. Currency code. Use three-character ISO-4217 code.", "type": "string" }, - "pageIdentifier": { - "description": "Page identifier.", + "discountValue": { + "description": "The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost", + "format": "float", + "type": "number" + }, + "tax": { + "description": "All the taxes associated with the transaction.", + "format": "float", + "type": "number" + }, + "transactionId": { + "description": "The transaction ID with a length limit of 128 characters.", "type": "string" + }, + "value": { + "description": "Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes": { - "description": "Safety Attribute categories and their associated confidence scores.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes", + "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", "properties": { - "categories": { - "description": "The display names of Safety Attribute categories associated with the generated content. Order matches the Scores.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scores": { - "description": "The confidence scores of the each category, higher value means higher confidence. Order matches the Categories.", - "items": { - "format": "float", - "type": "number" - }, - "type": "array" + "engine": { + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata": { - "description": "Summary with metadata information.", - "id": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata", - "properties": { - "citationMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata", - "description": "Citation metadata for given summary." - }, - "references": { - "description": "Document References.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference" - }, - "type": "array" + "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest": { + "description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "summary": { - "description": "Summary text with no citation information.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaServingConfig": { - "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", - "id": "GoogleCloudDiscoveryengineV1alphaServingConfig", + "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", "properties": { - "boostControlIds": { - "description": "Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.", - "items": { - "type": "string" - }, - "type": "array" - }, "createTime": { - "description": "Output only. ServingConfig created timestamp.", + "description": "Operation create time.", "format": "google-datetime", - "readOnly": true, "type": "string" }, - "customFineTuningSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", - "description": "Custom fine tuning configs. If SearchRequest.custom_fine_tuning_spec is set, it has higher priority than the configs set here." - }, - "displayName": { - "description": "Required. The human readable serving config display name. Used in Discovery UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "dissociateControlIds": { - "description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", - "items": { - "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUserEvent": { + "description": "UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with your website.", + "id": "GoogleCloudDiscoveryengineV1alphaUserEvent", + "properties": { + "attributes": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomAttribute" }, - "type": "array" + "description": "Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Discovery Engine API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is `traffic_channel`, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", + "type": "object" }, - "diversityLevel": { - "description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "attributionToken": { + "description": "Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field.", "type": "string" }, - "embeddingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", - "description": "Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config." - }, - "filterControlIds": { - "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", - "items": { - "type": "string" - }, - "type": "array" + "completionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, - "genericConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", - "description": "The GenericConfig of the serving configuration." + "dataStore": { + "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", + "type": "string" }, - "guidedSearchSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", - "description": "Guided search configs." + "directUserRequest": { + "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", + "type": "boolean" }, - "ignoreControlIds": { - "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "documents": { + "description": "List of Documents associated with this user event. This field is optional except for the following event types: * `view-item` * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a `search` event, this field represents the documents returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different UserEvent.documents is desired.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentInfo" }, "type": "array" }, - "mediaConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", - "description": "The MediaConfig of the serving configuration." - }, - "modelId": { - "description": "The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "engine": { + "description": "The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.", "type": "string" }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "eventTime": { + "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", + "format": "google-datetime", "type": "string" }, - "onewaySynonymsControlIds": { - "description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", - "items": { - "type": "string" - }, - "type": "array" + "eventType": { + "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", + "type": "string" }, - "rankingExpression": { - "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" }, - "redirectControlIds": { - "description": "IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", - "items": { - "type": "string" - }, - "type": "array" + "mediaInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaMediaInfo", + "description": "Media-specific info." }, - "replacementControlIds": { - "description": "Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "pageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPageInfo", + "description": "Page metadata such as categories and other critical information for certain event types such as `view-category-page`." + }, + "panel": { + "$ref": "GoogleCloudDiscoveryengineV1alphaPanelInfo", + "description": "Panel metadata associated with this user event." + }, + "promotionIds": { + "description": "The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID.", "items": { "type": "string" }, "type": "array" }, - "solutionType": { - "description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], + "searchInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchInfo", + "description": "SearchService.Search details related to the event. This field should be set for `search` event." + }, + "sessionId": { + "description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the session_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.", "type": "string" }, - "synonymsControlIds": { - "description": "Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "tagIds": { + "description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups.", "items": { "type": "string" }, "type": "array" }, - "updateTime": { - "description": "Output only. ServingConfig updated timestamp.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig": { - "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", - "id": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", - "properties": { - "contentSearchSpec": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", - "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig": { - "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - "id": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", - "properties": { - "contentFreshnessCutoffDays": { - "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", - "format": "int32", - "type": "integer" - }, - "contentWatchedPercentageThreshold": { - "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", - "format": "float", - "type": "number" + "transactionInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", + "description": "The transaction metadata (if any) associated with this user event." }, - "contentWatchedSecondsThreshold": { - "description": "Specifies the content watched minutes threshold for demotion.", - "format": "float", - "type": "number" + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Information about the end user." }, - "demotionEventType": { - "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "userPseudoId": { + "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSession": { - "description": "External session proto definition.", - "id": "GoogleCloudDiscoveryengineV1alphaSession", + "GoogleCloudDiscoveryengineV1alphaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1alphaUserInfo", "properties": { - "endTime": { - "description": "Output only. The time the session finished.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", - "type": "string" - }, - "startTime": { - "description": "Output only. The time the session started.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "state": { - "description": "The state of the session.", - "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS" - ], - "enumDescriptions": [ - "State is unspecified.", - "The session is currently open." - ], + "userAgent": { + "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", "type": "string" }, - "turns": { - "description": "Turns.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" - }, - "type": "array" - }, - "userPseudoId": { - "description": "A unique identifier for tracking users.", + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSessionTurn": { - "description": "Represents a turn, including a query from the user and a answer from service.", - "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", + "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", "properties": { - "answer": { - "description": "The resource name of the answer to the user query. Only set if the answer generation (/answer API call) happened in this turn.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "query": { - "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", - "description": "The user query." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine": { - "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", - "id": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine", + "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse", "properties": { - "name": { - "description": "The fully qualified resource name of the site search engine. Format: `projects/*/locations/*/dataStores/*/siteSearchEngine`", - "type": "string" + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { - "description": "Verification information for target sites in advanced site search.", - "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "GoogleCloudDiscoveryengineV1betaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1betaCondition", "properties": { - "siteVerificationState": { - "description": "Site verification state indicating the ownership and validity.", - "enum": [ - "SITE_VERIFICATION_STATE_UNSPECIFIED", - "VERIFIED", - "UNVERIFIED", - "EXEMPTED" - ], - "enumDescriptions": [ - "Defaults to VERIFIED.", - "Site ownership verified.", - "Site ownership pending verification or verification failed.", - "Site exempt from verification, e.g., a public website that opens to all." - ], - "type": "string" + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" + }, + "type": "array" }, - "verifyTime": { - "description": "Latest site verification time.", - "format": "google-datetime", - "type": "string" + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSpannerSource": { - "description": "The Spanner source for importing data", - "id": "GoogleCloudDiscoveryengineV1alphaSpannerSource", + "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", "properties": { - "databaseId": { - "description": "Required. The database ID of the source Spanner table.", - "type": "string" - }, - "enableDataBoost": { - "description": "Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).", + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", "type": "boolean" }, - "instanceId": { - "description": "Required. The instance ID of the source Spanner table.", - "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.", - "type": "string" - }, - "tableId": { - "description": "Required. The table name of the Spanner database that needs to be imported.", + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry": { - "description": "Suggestion deny list entry identifying the phrase to block from suggestions and the applied operation for the phrase.", - "id": "GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry", + "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", "properties": { - "blockPhrase": { - "description": "Required. Phrase to block from suggestions served. Can be maximum 125 characters.", + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", "type": "string" }, - "matchOperator": { - "description": "Required. The match operator to apply for this phrase. Whether to block the exact phrase, or block any suggestions containing this phrase.", - "enum": [ - "MATCH_OPERATOR_UNSPECIFIED", - "EXACT_MATCH", - "CONTAINS" - ], - "enumDescriptions": [ - "Default value. Should not be used", - "If the suggestion is an exact match to the block_phrase, then block it.", - "If the suggestion contains the block_phrase, then block it." - ], + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSite": { - "description": "A target site for the SiteSearchEngine.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", + "GoogleCloudDiscoveryengineV1betaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1betaControl", "properties": { - "exactMatch": { - "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", - "type": "boolean" - }, - "failureReason": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", - "description": "Output only. Failure reason.", - "readOnly": true - }, - "generatedUriPattern": { - "description": "Output only. This is system-generated based on the provided_uri_pattern.", + "associatedServingConfigIds": { + "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" + }, "readOnly": true, - "type": "string" + "type": "array" }, - "indexingStatus": { - "description": "Output only. Indexing status.", - "enum": [ - "INDEXING_STATUS_UNSPECIFIED", - "PENDING", - "FAILED", - "SUCCEEDED", - "DELETING" - ], - "enumDescriptions": [ - "Defaults to SUCCEEDED.", - "The target site is in the update queue and will be picked up by indexing pipeline.", - "The target site fails to be indexed.", - "The target site has been indexed.", - "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." - ], - "readOnly": true, - "type": "string" + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "description": "Defines a boost-type control" }, - "name": { - "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", - "readOnly": true, - "type": "string" + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + }, + "type": "array" }, - "providedUriPattern": { - "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" }, - "rootDomainUri": { - "description": "Output only. Root domain of the provided_uri_pattern.", - "readOnly": true, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", "type": "string" }, - "siteVerificationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", - "description": "Output only. Site ownership and validity verification status.", - "readOnly": true + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "description": "Defines a redirect-type control." }, - "type": { - "description": "The type of the target site, e.g., whether the site is to be included or excluded.", + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", "enum": [ - "TYPE_UNSPECIFIED", - "INCLUDE", - "EXCLUDE" + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" ], "enumDescriptions": [ - "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", - "Include the target site.", - "Exclude the target site." + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." ], "type": "string" }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", + "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" }, - "GoogleCloudDiscoveryengineV1alphaTextInput": { - "description": "Defines text input.", - "id": "GoogleCloudDiscoveryengineV1alphaTextInput", + "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata", "properties": { - "context": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConversationContext", - "description": "Conversation context of the input." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "input": { - "description": "Text input.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { - "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", + "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -15093,147 +16745,229 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest": { - "description": "Request message for SearchTuningService.TrainCustomModel method.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest", + "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the data ingestion and training." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "gcsTrainingInput": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput", - "description": "Cloud Storage training input." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", + "properties": { + "createTime": { + "deprecated": true, + "description": "Timestamp the Model was created at.", + "format": "google-datetime", + "type": "string" }, - "modelId": { - "description": "If not provided, a UUID will be generated.", + "displayName": { + "description": "The display name of the model.", "type": "string" }, - "modelType": { - "description": "Model to be trained. Supported values are: * **search-tuning**: Fine tuning the search system based on data provided.", + "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" + ], + "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." + ], + "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" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput": { - "description": "Cloud Storage training data input.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput", + "GoogleCloudDiscoveryengineV1betaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1betaDataStore", "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\"}`", + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], "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\"}", + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, "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.", + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, "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`", + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" + }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "languageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "description": "Language info for DataStore." + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "type": "array" + }, + "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { - "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", + "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "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.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "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.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTransactionInfo": { - "description": "A transaction represents the entire purchase transaction.", - "id": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", + "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata", "properties": { - "cost": { - "description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax - cost", - "format": "float", - "type": "number" - }, - "currency": { - "description": "Required. Currency code. Use three-character ISO-4217 code.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "discountValue": { - "description": "The total discount(s) value applied to this transaction. This figure should be excluded from TransactionInfo.value For example, if a user paid TransactionInfo.value amount, then nominal (pre-discount) value of the transaction is the sum of TransactionInfo.value and TransactionInfo.discount_value This means that profit is calculated the same way, regardless of the discount value, and that TransactionInfo.discount_value can be larger than TransactionInfo.value: * Profit = value - tax - cost", - "format": "float", - "type": "number" - }, - "tax": { - "description": "All the taxes associated with the transaction.", - "format": "float", - "type": "number" - }, - "transactionId": { - "description": "The transaction ID with a length limit of 128 characters.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "value": { - "description": "Required. Total non-zero value associated with the transaction. This value may include shipping, tax, or other adjustments to the total value that you want to include.", - "format": "float", - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { - "description": "Metadata associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata", "properties": { - "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "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" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest": { - "description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { - "description": "Response associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -15248,9 +16982,9 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -15265,355 +16999,478 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaUserEvent": { - "description": "UserEvent captures all metadata information Discovery Engine API needs to know about how end users interact with your website.", - "id": "GoogleCloudDiscoveryengineV1alphaUserEvent", + "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", "properties": { - "attributes": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomAttribute" - }, - "description": "Extra user event features to include in the recommendation model. These attributes must NOT contain data that needs to be parsed or processed further, e.g. JSON or other encodings. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Discovery Engine API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is `traffic_channel`, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", - "type": "object" - }, - "attributionToken": { - "description": "Token to attribute an API response to user action(s) to trigger the event. Highly recommended for user events that are the result of RecommendationService.Recommend. This field enables accurate attribution of recommendation model performance. The value must be one of: * RecommendResponse.attribution_token for events that are the result of RecommendationService.Recommend. * SearchResponse.attribution_token for events that are the result of SearchService.Search. This token enables us to accurately attribute page view or conversion completion back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass RecommendResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the RecommendResponse.attribution_token to this field.", - "type": "string" + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." }, - "completionInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", - "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." }, - "dataStore": { - "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", "type": "string" }, - "directUserRequest": { - "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", + "properties": { + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." }, - "documents": { - "description": "List of Documents associated with this user event. This field is optional except for the following event types: * `view-item` * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a `search` event, this field represents the documents returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different UserEvent.documents is desired.", + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "properties": { + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentInfo" + "type": "string" }, "type": "array" }, - "engine": { - "description": "The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.", - "type": "string" - }, - "eventTime": { - "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "eventType": { - "description": "Required. User event type. Allowed values are: Generic values: * `search`: Search for Documents. * `view-item`: Detailed page view of a Document. * `view-item-list`: View of a panel or ordered list of Documents. * `view-home-page`: View of the home page. * `view-category-page`: View of a category page, e.g. Home \u003e Men \u003e Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * `purchase`: Purchase an item(s) Media-related values: * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc.", - "type": "string" - }, - "filter": { - "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. One example is for `search` events, the associated SearchRequest may contain a filter expression in SearchRequest.filter conforming to https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events that are generated from a RecommendRequest, this field may be populated directly from RecommendRequest.filter conforming to https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngine", + "properties": { + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." }, - "mediaInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaMediaInfo", - "description": "Media-specific info." + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true }, - "pageInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaPageInfo", - "description": "Page metadata such as categories and other critical information for certain event types such as `view-category-page`." + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." }, - "panel": { - "$ref": "GoogleCloudDiscoveryengineV1alphaPanelInfo", - "description": "Panel metadata associated with this user event." + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "promotionIds": { - "description": "The promotion IDs if this is an event associated with promotions. Currently, this field is restricted to at most one ID.", + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", "items": { "type": "string" }, "type": "array" }, - "searchInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSearchInfo", - "description": "SearchService.Search details related to the event. This field should be set for `search` event." + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" }, - "sessionId": { - "description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the session_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add UserEvent.user_pseudo_id as prefix.", + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], "type": "string" }, - "tagIds": { - "description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups.", - "items": { - "type": "string" - }, - "type": "array" + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" }, - "transactionInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTransactionInfo", - "description": "The transaction metadata (if any) associated with this user event." + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." }, - "userInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", - "description": "Information about the end user." + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" }, - "userPseudoId": { - "description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Do not set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaUserInfo": { - "description": "Information of an end user.", - "id": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", "properties": { - "userAgent": { - "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", - "type": "string" + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "userId": { - "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", "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", + "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", "properties": { - "targetSites": { - "description": "TargetSites created.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" - }, - "type": "array" + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCondition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1betaCondition", + "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" - }, - "type": "array" - }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" - }, - "type": "array" + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", + "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", - "type": "boolean" + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", + "GoogleCloudDiscoveryengineV1betaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluation", "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", + "createTime": { + "description": "Output only. Timestamp the Evaluation was created at.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaControl": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "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.", - "items": { - "type": "string" - }, "readOnly": true, - "type": "array" + "type": "string" }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", - "description": "Defines a boost-type control" + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + "$ref": "GoogleRpcStatus" }, + "readOnly": true, "type": "array" }, - "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" - }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." }, "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", - "description": "Defines a redirect-type control." + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", + "readOnly": true }, - "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "state": { + "description": "Output only. The state of the evaluation.", "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" ], "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." ], + "readOnly": true, "type": "string" - }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." - }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", - "items": { - "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" - }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse", "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "type": "string" + "$ref": "GoogleRpcStatus" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -15622,43 +17479,88 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateEngineMetadata", + "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata", "properties": { "createTime": { - "description": "Operation create time.", + "description": "ImportSampleQueries operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -15673,201 +17575,255 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaCustomTuningModel": { - "description": "Metadata that describes a custom tuned model.", - "id": "GoogleCloudDiscoveryengineV1betaCustomTuningModel", + "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse", "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" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" }, - "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" - ], - "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." - ], + "type": "array" + }, + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", "type": "string" }, - "modelVersion": { - "description": "The version of the model.", + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", "format": "int64", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "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.", + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", "type": "string" }, - "trainingStartTime": { - "description": "Timestamp the model training was initiated.", + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1betaDataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1betaDataStore", + "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", "properties": { - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", - "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" - ], - "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." - ], - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." }, - "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", - "readOnly": true, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", "type": "string" }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaInterval": { + "description": "A floating point interval.", + "id": "GoogleCloudDiscoveryengineV1betaInterval", + "properties": { + "exclusiveMaximum": { + "description": "Exclusive upper bound.", + "format": "double", + "type": "number" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." + "exclusiveMinimum": { + "description": "Exclusive lower bound.", + "format": "double", + "type": "number" }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], + "maximum": { + "description": "Inclusive upper bound.", + "format": "double", + "type": "number" + }, + "minimum": { + "description": "Inclusive lower bound.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaLanguageInfo": { + "description": "Language info for DataStore.", + "id": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "properties": { + "language": { + "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", + "readOnly": true, "type": "string" }, - "languageInfo": { - "$ref": "GoogleCloudDiscoveryengineV1betaLanguageInfo", - "description": "Language info for DataStore." + "languageCode": { + "description": "The language code for the DataStore.", + "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "normalizedLanguageCode": { + "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", + "readOnly": true, "type": "string" }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "region": { + "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse", + "properties": { + "models": { + "description": "List of custom tuning models.", "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaCustomTuningModel" }, "type": "array" - }, - "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1betaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1betaProject", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. The timestamp when this project is created.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", "format": "google-datetime", + "readOnly": true, "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", "properties": { - "createTime": { - "description": "Operation create time.", + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", "format": "google-datetime", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", "format": "google-datetime", "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -15876,26 +17832,28 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -15910,683 +17868,651 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", "type": "string" - }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig" - }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig", + "GoogleCloudDiscoveryengineV1betaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetrics", "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" + }, + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" + }, + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1betaSchema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1betaSchema", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." + "jsonSchema": { + "description": "The JSON representation of the schema.", + "type": "string" }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1betaSearchRequest": { + "description": "Request message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequest", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, + "branch": { + "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", + "type": "string" + }, + "canonicalFilter": { + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", + "type": "string" + }, + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", + "description": "A specification for configuring the behavior of content search." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec" }, "type": "array" }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "embeddingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec", + "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." + }, + "facetSpecs": { + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec" + }, + "type": "array" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "imageQuery": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery", + "description": "Raw image query." + }, + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngine", - "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." + "offset": { + "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", - "readOnly": true, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", "type": "string" }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", - "items": { - "type": "string" + "pageSize": { + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "any" }, - "type": "array" + "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", + "type": "object" }, - "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "query": { + "description": "Raw search query.", "type": "string" }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], + "queryExpansionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec", + "description": "The query expansion specification that specifies the conditions under which query expansion occurs." + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, - "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "regionCode": { + "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" }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + "safeSearch": { + "description": "Whether to turn on safe search. This is only supported for website search.", + "type": "boolean" }, - "solutionType": { - "description": "Required. The solutions of the engine.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." }, - "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", - "format": "google-datetime", - "readOnly": true, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig", - "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig", - "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", "type": "string" }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", - "type": "string" + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", - "type": "string" + "spellCorrectionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", + "description": "The spell correction specification that specifies the mode under which spell correction takes effect." }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata", - "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", - "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserInfo", + "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec": { + "description": "Boost specification to boost certain documents.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", + "conditionBoostSpecs": { + "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec" }, "type": "array" - }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec": { + "description": "Boost applies to documents which match a condition.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", - "type": "string" + "boost": { + "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", + "format": "float", + "type": "number" }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", - "type": "string" + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "condition": { + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "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": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." + "attributeType": { + "description": "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]`. For example, `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "controlPoints": { + "description": "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": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" }, - "totalCount": { - "description": "Total count of entries that were processed.", - "format": "int64", + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "interpolationType": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "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": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "attributeValue": { + "description": "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" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "boostAmount": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1betaImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "maxExtractiveAnswerCount": { + "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", - "type": "string" + "maxExtractiveSegmentCount": { + "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", + "format": "int32", + "type": "integer" }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", - "type": "string" + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "returnSnippet": { + "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1betaImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", + "type": "boolean" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "ignoreNonSummarySeekingQuery": { + "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", + "type": "boolean" }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", - "type": "string" + "includeCitations": { + "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", + "type": "boolean" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", + "languageCode": { + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaLanguageInfo": { - "description": "Language info for DataStore.", - "id": "GoogleCloudDiscoveryengineV1betaLanguageInfo", + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", "properties": { - "language": { - "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", - "readOnly": true, - "type": "string" - }, - "languageCode": { - "description": "The language code for the DataStore.", + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", "type": "string" - }, - "normalizedLanguageCode": { - "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", - "readOnly": true, + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec", + "properties": { + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", "type": "string" - }, - "region": { - "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", - "readOnly": true, + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec": { + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", + "properties": { + "dataStore": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse": { - "description": "Response message for SearchTuningService.ListCustomModels method.", - "id": "GoogleCloudDiscoveryengineV1betaListCustomModelsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec": { + "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec", "properties": { - "models": { - "description": "List of custom tuning models.", + "embeddingVectors": { + "description": "The embedding vector used for retrieval. Limit to 1.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1betaCustomTuningModel" + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProject": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1betaProject", + "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector": { + "description": "Embedding vector.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, - "type": "string" - }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + "fieldPath": { + "description": "Embedding field path in schema.", "type": "string" }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + "vector": { + "description": "Query embedding vector.", + "items": { + "format": "float", + "type": "number" }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec": { + "description": "A facet specification to perform faceted search.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", - "type": "string" - }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", - "type": "string" + "enableDynamicPosition": { + "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", + "type": "boolean" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", - "type": "string" + "excludedFilterKeys": { + "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "type": "string" + }, + "type": "array" }, - "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", - "enum": [ - "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" - ], - "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." - ], - "type": "string" + "facetKey": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey", + "description": "Required. The facet key specification." }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", - "type": "string" + "limit": { + "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey": { + "description": "Specifies how a facet is computed.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "caseInsensitive": { + "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", + "type": "boolean" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "contains": { + "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", + "intervals": { + "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaInterval" + }, + "type": "array" + }, + "key": { + "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", "type": "string" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", + "orderBy": { + "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "prefixes": { + "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" + }, + "restrictedValues": { + "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery": { + "description": "Specifies the image query input.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery", + "properties": { + "imageBytes": { + "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], "type": "string" }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", "items": { "type": "string" }, @@ -16595,61 +18521,85 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec": { + "description": "Specification to determine under which conditions query expansion should occur.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "condition": { + "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", + "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", + "Automatic query expansion built by the Search API." + ], "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "pinUnexpandedResults": { + "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaSchema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1betaSchema", + "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec", "properties": { - "jsonSchema": { - "description": "The JSON representation of the schema.", + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec": { + "description": "The specification for query spell correction.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec", + "properties": { + "mode": { + "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "SUGGESTION_ONLY", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", + "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", + "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." + ], "type": "string" - }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" } }, "type": "object" @@ -16886,6 +18836,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1betaUserInfo", + "properties": { + "userAgent": { + "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", + "type": "string" + }, + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "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 9437e14f0ab..7741fe4ca3a 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -175,6 +175,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.DataStores = NewProjectsLocationsDataStoresService(s) rs.Evaluations = NewProjectsLocationsEvaluationsService(s) rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) + rs.IdentityMappingStores = NewProjectsLocationsIdentityMappingStoresService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) rs.Requirements = NewProjectsLocationsRequirementsService(s) @@ -194,6 +195,8 @@ type ProjectsLocationsService struct { GroundingConfigs *ProjectsLocationsGroundingConfigsService + IdentityMappingStores *ProjectsLocationsIdentityMappingStoresService + Operations *ProjectsLocationsOperationsService RankingConfigs *ProjectsLocationsRankingConfigsService @@ -865,6 +868,27 @@ type ProjectsLocationsGroundingConfigsService struct { s *Service } +func NewProjectsLocationsIdentityMappingStoresService(s *Service) *ProjectsLocationsIdentityMappingStoresService { + rs := &ProjectsLocationsIdentityMappingStoresService{s: s} + rs.Operations = NewProjectsLocationsIdentityMappingStoresOperationsService(s) + return rs +} + +type ProjectsLocationsIdentityMappingStoresService struct { + s *Service + + Operations *ProjectsLocationsIdentityMappingStoresOperationsService +} + +func NewProjectsLocationsIdentityMappingStoresOperationsService(s *Service) *ProjectsLocationsIdentityMappingStoresOperationsService { + rs := &ProjectsLocationsIdentityMappingStoresOperationsService{s: s} + return rs +} + +type ProjectsLocationsIdentityMappingStoresOperationsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -895,6 +919,7 @@ type ProjectsLocationsRequirementsService struct { func NewProjectsLocationsSampleQuerySetsService(s *Service) *ProjectsLocationsSampleQuerySetsService { rs := &ProjectsLocationsSampleQuerySetsService{s: s} rs.Operations = NewProjectsLocationsSampleQuerySetsOperationsService(s) + rs.SampleQueries = NewProjectsLocationsSampleQuerySetsSampleQueriesService(s) return rs } @@ -902,6 +927,8 @@ type ProjectsLocationsSampleQuerySetsService struct { s *Service Operations *ProjectsLocationsSampleQuerySetsOperationsService + + SampleQueries *ProjectsLocationsSampleQuerySetsSampleQueriesService } func NewProjectsLocationsSampleQuerySetsOperationsService(s *Service) *ProjectsLocationsSampleQuerySetsOperationsService { @@ -913,6 +940,15 @@ type ProjectsLocationsSampleQuerySetsOperationsService struct { s *Service } +func NewProjectsLocationsSampleQuerySetsSampleQueriesService(s *Service) *ProjectsLocationsSampleQuerySetsSampleQueriesService { + rs := &ProjectsLocationsSampleQuerySetsSampleQueriesService{s: s} + return rs +} + +type ProjectsLocationsSampleQuerySetsSampleQueriesService struct { + s *Service +} + func NewProjectsLocationsUserEventsService(s *Service) *ProjectsLocationsUserEventsService { rs := &ProjectsLocationsUserEventsService{s: s} return rs @@ -3937,11 +3973,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams s // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. OrderBy string `json:"orderBy,omitempty"` // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See parse and chunk - // documents + // search result mode defaults to `DOCUMENTS`. See parse and chunk documents // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) // // Possible values: @@ -4157,8 +4189,8 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResul // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse struct { // Answer: Answer resource object. If - // AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use - // Answer.name to fetch answer information using + // AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_ste + // ps is greater than 1, use Answer.name to fetch answer information using // ConversationalSearchService.GetAnswer API. Answer *GoogleCloudDiscoveryengineV1alphaAnswer `json:"answer,omitempty"` // AnswerQueryToken: A global unique ID used for logging. @@ -4487,9 +4519,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document (code pointer: - // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: - // http://shortn/_Ipo6KFFGBL). + // It's populated from the struct data from the Document , or the Chunk in + // search result . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -6056,6 +6087,11 @@ func (s GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata struct { +} + // GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for Create // Schema LRO. type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { @@ -7520,6 +7556,116 @@ func (s GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1alphaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1alphaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "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 GoogleCloudDiscoveryengineV1alphaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata: Metadata related // to the progress of the Export operation. This is returned by the // google.longrunning.Operation.metadata field. @@ -7912,6 +8058,34 @@ func (s GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.GetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { + // DocumentDataMap: Document data keyed by URI pattern. For example: + // document_data_map = { "www.url1.com/*": { "Categories": ["category1", + // "category2"] }, "www.url2.com/*": { "Categories": ["category3"] } } + DocumentDataMap map[string]googleapi.RawMessage `json:"documentDataMap,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DocumentDataMap") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentDataMap") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGroundingFact: Grounding Fact. type GoogleCloudDiscoveryengineV1alphaGroundingFact struct { // Attributes: Attributes associated with the fact. Common attributes include @@ -8329,6 +8503,119 @@ func (s GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of SampleQuerys that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of SampleQuerys successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest: Request message +// for SampleQueryService.ImportSampleQueries method. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + // InlineSource: The Inline source for sample query entries. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource `json:"inlineSource,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 + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BigquerySource") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource: The +// inline source for SampleQuerys. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource struct { + // SampleQueries: Required. A list of SampleQuerys to import. Max of 1000 + // items. + SampleQueries []*GoogleCloudDiscoveryengineV1alphaSampleQuery `json:"sampleQueries,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQueries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQueries") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequestInlineSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse: Response of +// the SampleQueryService.ImportSampleQueries method. If the long running +// operation is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata: // Metadata related to the progress of the ImportSuggestionDenyListEntries // operation. This is returned by the google.longrunning.Operation.metadata @@ -8839,6 +9126,152 @@ func (s GoogleCloudDiscoveryengineV1alphaListEnginesResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse: Response +// message for EvaluationService.ListEvaluationResults method. +type GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse struct { + // EvaluationResults: The EvaluationResults. + EvaluationResults []*GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult `json:"evaluationResults,omitempty"` + // NextPageToken: A token that can be sent as + // ListEvaluationResultsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + 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. "EvaluationResults") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EvaluationResults") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResul +// t: Represents the results of an evaluation for a single SampleQuery. +type GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult struct { + // QualityMetrics: Output only. The metrics produced by the evaluation, for a + // given SampleQuery. + QualityMetrics *GoogleCloudDiscoveryengineV1alphaQualityMetrics `json:"qualityMetrics,omitempty"` + // SampleQuery: Output only. The SampleQuery that was evaluated. + SampleQuery *GoogleCloudDiscoveryengineV1alphaSampleQuery `json:"sampleQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "QualityMetrics") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QualityMetrics") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponseEvaluationResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse: Response message +// for EvaluationService.ListEvaluations method. +type GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse struct { + // Evaluations: The Evaluations. + Evaluations []*GoogleCloudDiscoveryengineV1alphaEvaluation `json:"evaluations,omitempty"` + // NextPageToken: A token that can be sent as ListEvaluationsRequest.page_token + // to retrieve the next page. If this field is omitted, there are no subsequent + // pages. + 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. "Evaluations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Evaluations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse: Response message +// for SampleQueryService.ListSampleQueries method. +type GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse struct { + // NextPageToken: A token that can be sent as + // ListSampleQueriesRequest.page_token to retrieve the next page. If this field + // is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // SampleQueries: The SampleQuerys. + SampleQueries []*GoogleCloudDiscoveryengineV1alphaSampleQuery `json:"sampleQueries,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 GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse: Response +// message for SampleQuerySetService.ListSampleQuerySets method. +type GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse struct { + // NextPageToken: A token that can be sent as + // ListSampleQuerySetsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // SampleQuerySets: The SampleQuerySets. + SampleQuerySets []*GoogleCloudDiscoveryengineV1alphaSampleQuerySet `json:"sampleQuerySets,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 GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListSchemasResponse: Response message for // SchemaService.ListSchemas method. type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { @@ -9646,6 +10079,109 @@ func (s GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1alphaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocNdcg") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics: Stores the +// metric values at specific top-k levels. +type GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + // GoogleCloudDiscoveryengineV1alphaQuery: Defines a user inputed query. type GoogleCloudDiscoveryengineV1alphaQuery struct { // QueryId: Unique Id for the query. @@ -10350,6 +10886,147 @@ func (s GoogleCloudDiscoveryengineV1alphaRequirementViolationSamplesBinding) Mar type GoogleCloudDiscoveryengineV1alphaResumeEngineRequest struct { } +// GoogleCloudDiscoveryengineV1alphaSampleQuery: Sample Query captures metadata +// to be used for evaluation. +type GoogleCloudDiscoveryengineV1alphaSampleQuery struct { + // CreateTime: Output only. Timestamp the SampleQuery was created at. + CreateTime string `json:"createTime,omitempty"` + // Name: Immutable. The full resource name of the sample query, in the format + // of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sam + // pleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a + // length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QueryEntry: The query entry. + QueryEntry *GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry `json:"queryEntry,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 GoogleCloudDiscoveryengineV1alphaSampleQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSampleQuery + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry: Query Entry captures +// metadata to be used for search evaluation. +type GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry struct { + // Query: Required. The query. + Query string `json:"query,omitempty"` + // Targets: List of targets for the query. + Targets []*GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget `json:"targets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget: Defines the +// parameters of the query's expected outcome. +type GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget struct { + // PageNumbers: Expected page numbers of the target. Each page number must be + // non negative. + PageNumbers []int64 `json:"pageNumbers,omitempty"` + // Score: Relevance score of the target. + Score float64 `json:"score,omitempty"` + // Uri: Expected uri of the target. This field must be a UTF-8 encoded string + // with a length limit of 2048 characters. Example of valid uris: + // `https://example.com/abc`, `gcs://example/example.pdf`. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageNumbers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PageNumbers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSampleQueryQueryEntryTarget + 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 +} + +// GoogleCloudDiscoveryengineV1alphaSampleQuerySet: A SampleQuerySet is the +// parent resource of SampleQuery, and contains the configurations shared by +// all SampleQuery under it. +type GoogleCloudDiscoveryengineV1alphaSampleQuerySet struct { + // CreateTime: Output only. Timestamp the SampleQuerySet was created at. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the SampleQuerySet. + Description string `json:"description,omitempty"` + // DisplayName: Required. The sample query set display name. This field must be + // a UTF-8 encoded string with a length limit of 128 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Immutable. The full resource name of the SampleQuerySet, in the format + // of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + 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. "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 GoogleCloudDiscoveryengineV1alphaSampleQuerySet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSampleQuerySet + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and layout of // a type of document data. type GoogleCloudDiscoveryengineV1alphaSchema struct { @@ -10570,6 +11247,15 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // SearchAsYouTypeSpec: Search as you type configuration. Only supported for // the IndustryVertical.MEDIA vertical. SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` // Session: The session resource name. Optional. Session allows users to do // multi-turn /search API calls or coordination between /search API calls and // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call @@ -10835,10 +11521,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // search result mode defaults to `DOCUMENTS`. // // Possible values: // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. @@ -11371,7 +12054,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstan // filtering, where geolocation filters are detected in natural language search // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. // If this field is set, it overrides the field names set in - // Servingconfig.geo_search_query_detection_field_names. + // ServingConfig.geo_search_query_detection_field_names. GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") // to unconditionally include in API requests. By default, fields with empty or @@ -12617,6 +13300,73 @@ func (s GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.SetUriPatternDocumentData operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata 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 GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest: Request +// message for SiteSearchEngineService.SetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest struct { + // DocumentDataMap: Document data keyed by URI pattern. Each entry must be + // consistent with the Schema. For example: Schema = { "type": "object", + // "properties": { "Categories": { "type": "array", "items": { "retrievable": + // true, "type": "string" } } } document_data_map = { "www.url1.com/*": { + // "Categories": ["category1", "category2"] }, "www.url2.com/*": { + // "Categories": ["category3"] } } + DocumentDataMap map[string]googleapi.RawMessage `json:"documentDataMap,omitempty"` + // EmptyDocumentDataMap: If true, clears the document data map. If true, + // SetUriPatternDocumentDataRequest.document_data_map must be empty. + EmptyDocumentDataMap bool `json:"emptyDocumentDataMap,omitempty"` + // Schema: Optional. If not provided, the current Schema is used. If provided, + // validates and updates the Schema. If validation fails, an error is returned. + Schema googleapi.RawMessage `json:"schema,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocumentDataMap") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentDataMap") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.SetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse struct { +} + // GoogleCloudDiscoveryengineV1alphaSiteSearchEngine: SiteSearchEngine captures // DataStore level site search persisting configurations. It is a singleton // value per data store. @@ -13763,6 +14513,11 @@ func (s GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata struct { +} + // GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create // Schema LRO. type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { @@ -14523,6 +15278,113 @@ func (s GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1betaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1betaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,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 GoogleCloudDiscoveryengineV1betaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1betaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata: // Metadata related to the progress of the ImportCompletionSuggestions // operation. This will be returned by the @@ -14669,6 +15531,66 @@ func (s GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of SampleQuerys that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of SampleQuerys successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse: Response of the +// SampleQueryService.ImportSampleQueries method. If the long running operation +// is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata: // Metadata related to the progress of the ImportSuggestionDenyListEntries // operation. This is returned by the google.longrunning.Operation.metadata @@ -14790,6 +15712,54 @@ func (s GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1betaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} + // GoogleCloudDiscoveryengineV1betaLanguageInfo: Language info for DataStore. type GoogleCloudDiscoveryengineV1betaLanguageInfo struct { // Language: Output only. Language part of normalized_language_code. E.g.: @@ -15048,615 +16018,3500 @@ func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of -// a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - // Name: Immutable. The full resource name of the schema, in the format of - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1betaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") to include in API + // NullFields is a list of field names (e.g. "DocNdcg") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s GoogleCloudDiscoveryengineV1betaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetrics return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the ownership and - // validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website that - // opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics: Stores the metric +// values at specific top-k levels. +type GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") 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. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo +func (s GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1betaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated to - // include all pages whose address contains the provided_uri_pattern. If set to - // true, an uri_pattern is generated to try to be an exact match of the - // provided_uri_pattern or just the specific page if the provided_uri_pattern - // is a specific one. provided_uri_pattern is always normalized to generate the - // URI pattern to be used by the search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` - // GeneratedUriPattern: Output only. This is system-generated based on the - // provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be picked up - // by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to be - // deleted. This is a transitioning state which will resulted in either: 1. - // target site deleted if unindexing is successful; 2. state reverts to - // SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - // Name: Output only. The fully qualified resource name of the target site. +func (s *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of +// a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + // Name: Immutable. The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. + // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. Name string `json:"name,omitempty"` - // ProvidedUriPattern: Required. Input only. The user provided URI pattern from - // which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - // RootDomainUri: Output only. Root domain of the provided_uri_pattern. - RootDomainUri string `json:"rootDomainUri,omitempty"` - // SiteVerificationInfo: Output only. Site ownership and validity verification - // status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be included - // or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior - // defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // ForceSendFields is a list of field names (e.g. "JsonSchema") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API + // NullFields is a list of field names (e.g. "JsonSchema") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite +func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to +// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave + // this field empty, to search documents under the default branch. + Branch string `json:"branch,omitempty"` + // CanonicalFilter: The default filter that is applied when a user performs a + // search without checking any filters on the search page. The filter applied + // to every search request when quality improvement such as query expansion is + // needed. In the case a query does not have a sufficient amount of results + // this filter will be used to determine whether or not to enable the query + // expansion flow. The original filter will still be used for the query + // expanded search. This field is strongly recommended to achieve high search + // quality. For more information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of content + // search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it + // will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no facets are + // returned. A maximum of 100 values are allowed. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For + // more information, see Standard fields + // (https://cloud.google.com/apis/design/standard_fields). This field helps to + // better interpret the query. If a value isn't specified, the query language + // code is automatically detected, which may not be accurate. + LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that is, + // starting result location, amongst the Documents deemed by the API as + // relevant) in search results. This field is only considered if page_token is + // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering + // for retail search, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field + // is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of Documents to return. The maximum allowed value + // depends on the data type. Values above the maximum value are coerced to the + // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * + // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: + // Default `50`, Maximum `100`. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to SearchService.Search must match the call that + // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageToken string `json:"pageToken,omitempty"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. If set + // to non-empty, results are restricted or boosted based on the location + // provided. For example, `user_country_code: "au" For available codes see + // Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which enables + // image searching. For example, `search_type: 1` + Params googleapi.RawMessage `json:"params,omitempty"` + // Query: Raw search query. + Query string `json:"query,omitempty"` + // QueryExpansionSpec: The query expansion specification that specifies the + // conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. This overrides ServingConfig.ranking_expression. The + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RegionCode: 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. + RegionCode string `json:"regionCode,omitempty"` + // SafeSearch: Whether to turn on safe search. This is only supported for + // website search. + SafeSearch bool `json:"safeSearch,omitempty"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` + // SpellCorrectionSpec: The spell correction specification that specifies the + // mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // UserInfo: Information about the end user. Highly recommended for analytics. + // UserInfo.user_agent is used to deduce `device_type` for analytics. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. This should be the same + // identifier as UserEvent.user_pseudo_id and + // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") to include in API + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason +func (s GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: Failed -// due to insufficient quota. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total quota - // this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost specification +// to boost certain documents. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document matches + // multiple conditions in the specifictions, boost scores from these + // specifications are all applied and combined in a non-linear way. Maximum + // number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to include + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata related -// to the progress of the TrainCustomModel operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec: +// Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a + // big promotion. However, it does not necessarily mean that the boosted + // document will be the top result at all times, nor that other documents will + // be excluded. Results could still be shown even when none of them matches the + // condition. And results that are significantly more relevant to the search + // query can still trump your heavily favored but irrelevant documents. Setting + // to -1.0 gives the document a big demotion. However, results that are deeply + // relevant might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. Setting to + // 0.0 means no boost applied. The boosting condition is ignored. Only one of + // the (condition, boost) combination or the boost_control_spec below are set. + // If both are set then the global boost is ignored and the more fine-grained + // boost_control_spec is applied. + Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` + // Condition: An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * To boost + // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": + // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Boost") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of the -// TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `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 +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpec: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: 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]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: 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. "ErrorConfig") to include in API + // 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 GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata associated with -// a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune applies to. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` - Engine string `json:"engine,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: 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: 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. "Engine") 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. "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 GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTuneEngineResponse: Response associated with -// a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineResponse struct { +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + 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 } -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningCancelOperationRequest: The request message for -// Operations.CancelOperation. -type GoogleLongrunningCancelOperationRequest struct { +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveConte +// ntSpec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers returned + // in each search result. An extractive answer is a verbatim answer extracted + // from the original document, which provides a precise and contextually + // relevant answer to the search query. If the number of matching answers is + // less than the `max_extractive_answer_count`, return all of the answers. + // Otherwise, return the `max_extractive_answer_count`. At most five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments returned in + // each search result. Only applied if the DataStore is set to + // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is + // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from + // the original document that is relevant to the search query, and, in general, + // more verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. If the number of matching + // segments is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent from + // each selected segments. Return at most `num_previous_segments` segments + // before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `json:"operations,omitempty"` +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} - // 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet + // return, use `return_snippet` field. For backwards compatibility, we will + // return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect + // on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be + // returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No summary is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that + // are not summary-seeking. The default value is `false`. Google employs + // search-query classification to detect summary-seeking queries. No summary is + // returned if the search query is classified as a non-summary seeking query. + // For example, `why is the sky blue` and `Who is the best soccer player in the + // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` + // are not. They are most likely navigational queries. If this field is set to + // `true`, we skip generating summaries for non-summary seeking queries and + // return fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citations in the summary. The + // default value is `false`. When this field is set to `true`, summaries + // include in-line citation numbers. Example summary including citations: + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business intelligence, + // all within a unified platform [2, 3]. The citation numbers refer to the + // returned search results and are 1-indexed. For example, [1] means that the + // sentence is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // SummaryResultCount: The number of top results to generate the summary from. + // If the number of results returned is less than `summaryResultCount`, the + // summary is generated from all of the results. At most 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleMonitoringV3TypedValue: A single strongly-typed value. -type GoogleMonitoringV3TypedValue struct { - // BoolValue: A Boolean value: `true` or `false`. - BoolValue bool `json:"boolValue,omitempty"` - // DistributionValue: A distribution value. - DistributionValue *GoogleApiDistribution `json:"distributionValue,omitempty"` - // DoubleValue: A 64-bit double-precision floating-point number. Its magnitude - // is approximately ±10±300 and it has 16 significant digits of precision. - DoubleValue float64 `json:"doubleValue,omitempty"` - // Int64Value: A 64-bit integer. Its range is approximately ±9.2x1018. - Int64Value int64 `json:"int64Value,omitempty,string"` - // StringValue: A variable-length string value. - StringValue string `json:"stringValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoolValue") to +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lPromptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoolValue") to include in API + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleMonitoringV3TypedValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleMonitoringV3TypedValue +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleMonitoringV3TypedValue) UnmarshalJSON(data []byte) error { - type NoMethod GoogleMonitoringV3TypedValue - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleProtobufEmpty: 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 GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct to +// define data stores to filter on in a search call and configurations for +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. +type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values 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 +func (s GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: 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 -type GoogleTypeDate struct { - // Day: 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. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without a year. - Year int64 `json:"year,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 +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do semantic +// document retrieval. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "EmbeddingVectors") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: Represents a textual expression in the Common Expression -// Language (CEL) syntax. CEL is a C-like expression language. The syntax and -// semantics of CEL are documented at https://github.com/google/cel-spec. -// Example (Comparison): title: "Summary size limit" description: "Determines -// if a summary is less than 100 chars" expression: "document.summary.size() < -// 100" Example (Equality): title: "Requestor is owner" description: -// "Determines if requestor is the document owner" expression: "document.owner -// == request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly visible" -// expression: "document.type != 'private' && document.type != 'internal'" -// Example (Data Manipulation): title: "Notification string" description: -// "Create a notification string with a timestamp." expression: "'New message -// received at ' + string(document.create_time)" The exact variables and -// functions that may be referenced within an expression are determined by the -// service that evaluates it. See the service documentation for additional -// information. -type GoogleTypeExpr struct { - // Description: Optional. Description of the expression. This is a longer text - // which describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - // Expression: Textual representation of an expression in Common Expression - // Language syntax. - Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression for - // error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - // Title: Optional. Title for the expression, i.e. a short string describing - // its purpose. This can be used e.g. in UIs which allow to enter the - // expression. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector: +// Embedding vector. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FieldPath") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If set to + // true, the position of this facet among all facets in the response is + // determined automatically. If dynamic facets are enabled, it is ordered + // together. If set to false, the position of this facet in the response is the + // same as in the request, and it is ranked before the facets with dynamic + // position enable and all dynamic facets. For example, you may always want to + // have rating facet returned in the response, but it's not necessarily to + // always display the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet in + // response is determined automatically. Another example, assuming you have the + // following facets in the request: * "rating", enable_dynamic_position = true + // * "price", enable_dynamic_position = false * "brands", + // enable_dynamic_position = false And also you have a dynamic facets enabled, + // which generates a facet `gender`. Then the final order of the facets in the + // response can be ("price", "brands", "rating", "gender") or ("price", + // "brands", "gender", "rating") depends on how API orders "gender" and + // "rating" facets. However, notice that "price" and "brands" are always ranked + // at first and second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By default, + // FacetKey.key is not excluded from the filter unless it is listed in this + // field. Listing a facet key in this field allows its values to appear as + // facet results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. For example, suppose + // there are 100 documents with the color facet "Red" and 200 documents with + // the color facet "Blue". A query containing the filter "color:ANY("Red")" and + // having "color" as FacetKey.key would by default return only "Red" documents + // in the search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" would + // not be shown as an available facet value. If "color" is listed in + // "excludedFilterKeys", then the query returns the facet values "Red" with + // count 100 and "Blue" with count 200, because the "color" key is now excluded + // from the filter. Because this field doesn't affect search results, the + // search results are still correctly filtered to return only "Red" documents. + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error + // is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Limit: Maximum facet values that are returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values above + // 300 are coerced to 300. For aggregation in healthcare search, when the + // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden + // to 10,000 internally, regardless of the value set here. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableDynamicPosition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ProjectsGetCall struct { +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: Specifies +// how a facet is computed. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when getting + // faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + // Contains: Only get facet values that contain the given strings. For example, + // suppose "category" has three values "Action > 2022", "Action > 2021" and + // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only + // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual + // fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values are: * + // "count desc", which means order by SearchResponse.Facet.values.count + // descending. * "value desc", which means order by + // SearchResponse.Facet.values.value descending. Only applies to textual + // facets. If not set, textual values are sorted in natural order + // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are + // sorted in the order given by FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + // Prefixes: Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", "Action > + // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" + // facet only contains "Action > 2022" and "Action > 2021". Only supported on + // textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + // RestrictedValues: Only get facet for the given restricted values. Only + // supported on textual fields. For example, suppose "category" has three + // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only contains + // "Action > 2022". Only supported on textual fields. Maximum is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CaseInsensitive") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies the image +// query input. +type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, + // and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ImageBytes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ImageBytes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandin +// gSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // ServingConfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion should +// occur. +type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. Default + // to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this + // case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query is + // used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this field is + // set to true, unexpanded products are always at the top of the search + // results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QueryId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction replaces the original search + // query. Defaults to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, + // server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a + // suggestion is found, it is put in the SearchResponse.corrected_query. The + // spelling suggestion won't be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the ownership and + // validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website that + // opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1betaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated to + // include all pages whose address contains the provided_uri_pattern. If set to + // true, an uri_pattern is generated to try to be an exact match of the + // provided_uri_pattern or just the specific page if the provided_uri_pattern + // is a specific one. provided_uri_pattern is always normalized to generate the + // URI pattern to be used by the search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` + // GeneratedUriPattern: Output only. This is system-generated based on the + // provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be picked up + // by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to be + // deleted. This is a transitioning state which will resulted in either: 1. + // target site deleted if unindexing is successful; 2. state reverts to + // SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + // Name: Output only. The fully qualified resource name of the target site. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + // ProvidedUriPattern: Required. Input only. The user provided URI pattern from + // which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + // RootDomainUri: Output only. Root domain of the provided_uri_pattern. + RootDomainUri string `json:"rootDomainUri,omitempty"` + // SiteVerificationInfo: Output only. Site ownership and validity verification + // status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + // Type: The type of the target site, e.g., whether the site is to be included + // or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior + // defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. The target site's last updated time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExactMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuotaFailure") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: Failed +// due to insufficient quota. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total quota + // this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TotalRequiredQuota") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata related +// to the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata 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 GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `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 GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata associated with +// a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection_id + // }/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineResponse: Response associated with +// a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata 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 GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata 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 GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1betaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must be a + // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This should not be set when using the + // client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is + // set. + UserAgent string `json:"userAgent,omitempty"` + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. Always + // use a hashed value for this ID. Don't set the field to the same fixed ID for + // different users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserId string `json:"userId,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserAgent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UserAgent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `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 GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleMonitoringV3TypedValue: A single strongly-typed value. +type GoogleMonitoringV3TypedValue struct { + // BoolValue: A Boolean value: `true` or `false`. + BoolValue bool `json:"boolValue,omitempty"` + // DistributionValue: A distribution value. + DistributionValue *GoogleApiDistribution `json:"distributionValue,omitempty"` + // DoubleValue: A 64-bit double-precision floating-point number. Its magnitude + // is approximately ±10±300 and it has 16 significant digits of precision. + DoubleValue float64 `json:"doubleValue,omitempty"` + // Int64Value: A 64-bit integer. Its range is approximately ±9.2x1018. + Int64Value int64 `json:"int64Value,omitempty,string"` + // StringValue: A variable-length string value. + StringValue string `json:"stringValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoolValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoolValue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleMonitoringV3TypedValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleMonitoringV3TypedValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleMonitoringV3TypedValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleMonitoringV3TypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + +// GoogleProtobufEmpty: 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 GoogleProtobufEmpty 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) +} + +// GoogleTypeDate: 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 +type GoogleTypeDate struct { + // Day: 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. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,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 GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The syntax and +// semantics of CEL are documented at https://github.com/google/cel-spec. +// Example (Comparison): title: "Summary size limit" description: "Determines +// if a summary is less than 100 chars" expression: "document.summary.size() < +// 100" Example (Equality): title: "Requestor is owner" description: +// "Determines if requestor is the document owner" expression: "document.owner +// == request.auth.claims.email" Example (Logic): title: "Public documents" +// description: "Determine whether the document should be publicly visible" +// expression: "document.type != 'private' && document.type != 'internal'" +// Example (Data Manipulation): title: "Notification string" description: +// "Create a notification string with a timestamp." expression: "'New message +// received at ' + string(document.create_time)" The exact variables and +// functions that may be referenced within an expression are determined by the +// service that evaluates it. See the service documentation for additional +// information. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a longer text + // which describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + // Expression: Textual representation of an expression in Common Expression + // Language syntax. + Expression string `json:"expression,omitempty"` + // Location: Optional. String indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + // Title: Optional. Title for the expression, i.e. a short string describing + // its purpose. This can be used e.g. in UIs which allow to enter the + // expression. + Title string `json:"title,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 GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Project. Returns NOT_FOUND when the project is not yet created. +// +// - name: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) Get(name string) *ProjectsGetCall { + c := &ProjectsGetCall{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 *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { + 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 *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCall) 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.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaProject.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProject, 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 := &GoogleCloudDiscoveryengineV1alphaProject{ + 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 ProjectsProvisionCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaprovisionprojectrequest *GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Provision: Provisions the project resource. During the process, related +// systems will get prepared and initialized. Caller must read the Terms for +// data use (https://cloud.google.com/retail/data-use-terms), and optionally +// specify in request to provide consent to that service terms. +// +// - name: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1alphaprovisionprojectrequest *GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest) *ProjectsProvisionCall { + c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaprovisionprojectrequest = googleclouddiscoveryenginev1alphaprovisionprojectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsProvisionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsProvisionCall) 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.googleclouddiscoveryenginev1alphaprovisionprojectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:provision") + 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 "discoveryengine.projects.provision" 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 *ProjectsProvisionCall) 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 ProjectsReportConsentChangeCall struct { + s *Service + project string + googleclouddiscoveryenginev1alphareportconsentchangerequest *GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ReportConsentChange: Updates service terms for this project. This method can +// be used to retroactively accept the latest terms. Terms available for +// update: * Terms for data use +// (https://cloud.google.com/retail/data-use-terms) +// +// - project: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) ReportConsentChange(project string, googleclouddiscoveryenginev1alphareportconsentchangerequest *GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest) *ProjectsReportConsentChangeCall { + c := &ProjectsReportConsentChangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.googleclouddiscoveryenginev1alphareportconsentchangerequest = googleclouddiscoveryenginev1alphareportconsentchangerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsReportConsentChangeCall) Fields(s ...googleapi.Field) *ProjectsReportConsentChangeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsReportConsentChangeCall) Context(ctx context.Context) *ProjectsReportConsentChangeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsReportConsentChangeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsReportConsentChangeCall) 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.googleclouddiscoveryenginev1alphareportconsentchangerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+project}:reportConsentChange") + 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, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.reportConsentChange" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaProject.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsReportConsentChangeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProject, 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 := &GoogleCloudDiscoveryengineV1alphaProject{ + 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 ProjectsLocationsEstimateDataSizeCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EstimateDataSize: Estimates the data size to be used by a customer. +// +// - location: Full resource name of the location, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { + c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEstimateDataSizeCall) 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.googleclouddiscoveryenginev1alphaestimatedatasizerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}:estimateDataSize") + 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 "discoveryengine.projects.locations.estimateDataSize" 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 *ProjectsLocationsEstimateDataSizeCall) 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 ProjectsLocationsGetAclConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAclConfig: Gets the AclConfig. +// +// - name: Resource name of AclConfig, such as +// `projects/*/locations/*/aclConfig`. If the caller does not have permission +// to access the AclConfig, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsGetAclConfigCall { + c := &ProjectsLocationsGetAclConfigCall{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 *ProjectsLocationsGetAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAclConfigCall { + 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 *ProjectsLocationsGetAclConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAclConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetAclConfigCall) Context(ctx context.Context) *ProjectsLocationsGetAclConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetAclConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetAclConfigCall) 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.getAclConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, 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 := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + 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 ProjectsLocationsUpdateAclConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// 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. +// +// - name: Immutable. The full resource name of the acl configuration. Format: +// `projects/{project}/locations/{location}/aclConfig`. This field must be a +// UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsService) UpdateAclConfig(name string, googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig) *ProjectsLocationsUpdateAclConfigCall { + c := &ProjectsLocationsUpdateAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaaclconfig = googleclouddiscoveryenginev1alphaaclconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateAclConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsUpdateAclConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateAclConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsUpdateAclConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateAclConfigCall) 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.googleclouddiscoveryenginev1alphaaclconfig) + 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 "discoveryengine.projects.locations.updateAclConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, 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 := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + 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 ProjectsLocationsCollectionsDataConnectorOperationsGetCall 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 *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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.collections.dataConnector.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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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 ProjectsLocationsCollectionsDataConnectorOperationsListCall 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 *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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.collections.dataConnector.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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword suggestions. +// +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) 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/{+dataStore}:completeQuery") + 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.completeQuery" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + 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 ProjectsLocationsCollectionsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To serve +// these documents for Search, or Recommendation use case, an Engine needs to +// be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { + c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user want to +// directly create an advanced data store for site search. If the data store is +// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE +// content_config), this flag will be ignored. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) 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.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + 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 "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresCreateCall) 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 ProjectsLocationsCollectionsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresDeleteCall{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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) 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, "v1alpha/{+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 "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresDeleteCall) 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 ProjectsLocationsCollectionsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { + c := &ProjectsLocationsCollectionsDataStoresGetCall{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 *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { + 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 *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetCall) 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.collections.dataStores.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, 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 := &GoogleCloudDiscoveryengineV1alphaDataStore{ + 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 ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// +// - name: Full DocumentProcessingConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/documentProcessingConfig`. +func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c := &ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall{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 *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + 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 *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) 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.collections.dataStores.getDocumentProcessingConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, 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 := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + 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 ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + 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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) 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.collections.dataStores.getSiteSearchEngine" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, 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 := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + 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 ProjectsLocationsCollectionsDataStoresListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a Project. Returns NOT_FOUND when the project is not yet created. +// List: Lists all the DataStores associated with the project. // -// - name: Full resource name of a Project, such as -// `projects/{project_id_or_number}`. -func (r *ProjectsService) Get(name string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. If +// the caller does not have permission to list DataStores under this +// location, regardless of whether or not this data store exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { + c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type . For +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` +func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15664,27 +19519,27 @@ func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { // 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 *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15692,26 +19547,160 @@ func (c *ProjectsGetCall) 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, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") 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.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.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 *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + 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 *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) 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 ProjectsLocationsCollectionsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { + c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) 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.googleclouddiscoveryenginev1alphadatastore) + 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 "discoveryengine.projects.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaProject.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProject, error) { +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15730,7 +19719,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscover if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProject{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15743,62 +19732,61 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscover return ret, nil } -type ProjectsProvisionCall struct { +type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { s *Service - name string - googleclouddiscoveryenginev1alphaprovisionprojectrequest *GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest + dataStore string + googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Provision: Provisions the project resource. During the process, related -// systems will get prepared and initialized. Caller must read the Terms for -// data use (https://cloud.google.com/retail/data-use-terms), and optionally -// specify in request to provide consent to that service terms. +// TrainCustomModel: Trains a custom model. // -// - name: Full resource name of a Project, such as -// `projects/{project_id_or_number}`. -func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1alphaprovisionprojectrequest *GoogleCloudDiscoveryengineV1alphaProvisionProjectRequest) *ProjectsProvisionCall { - c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaprovisionprojectrequest = googleclouddiscoveryenginev1alphaprovisionprojectrequest +// - 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, googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1alphatraincustommodelrequest = googleclouddiscoveryenginev1alphatraincustommodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { +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 *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { +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 *ProjectsProvisionCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { +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.googleclouddiscoveryenginev1alphaprovisionprojectrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatraincustommodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:provision") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:trainCustomModel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15806,18 +19794,18 @@ func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.provision" call. +// 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 *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -15849,81 +19837,91 @@ func (c *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrun return ret, nil } -type ProjectsReportConsentChangeCall struct { - s *Service - project string - googleclouddiscoveryenginev1alphareportconsentchangerequest *GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReportConsentChange: Updates service terms for this project. This method can -// be used to retroactively accept the latest terms. Terms available for -// update: * Terms for data use -// (https://cloud.google.com/retail/data-use-terms) +// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. +// DocumentProcessingConfig is a singleon resource of DataStore. It's empty +// when DataStore is created. The first call to this method will set up +// DocumentProcessingConfig. // -// - project: Full resource name of a Project, such as -// `projects/{project_id_or_number}`. -func (r *ProjectsService) ReportConsentChange(project string, googleclouddiscoveryenginev1alphareportconsentchangerequest *GoogleCloudDiscoveryengineV1alphaReportConsentChangeRequest) *ProjectsReportConsentChangeCall { - c := &ProjectsReportConsentChangeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.googleclouddiscoveryenginev1alphareportconsentchangerequest = googleclouddiscoveryenginev1alphareportconsentchangerequest +// - name: The full resource name of the Document Processing Config. Format: +// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig +// `. +func (r *ProjectsLocationsCollectionsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + c := &ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DocumentProcessingConfig to update. The following are the +// only supported fields: * DocumentProcessingConfig.ocr_config If not set, all +// supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + 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 *ProjectsReportConsentChangeCall) Fields(s ...googleapi.Field) *ProjectsReportConsentChangeCall { +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsReportConsentChangeCall) Context(ctx context.Context) *ProjectsReportConsentChangeCall { +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsReportConsentChangeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsReportConsentChangeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) 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.googleclouddiscoveryenginev1alphareportconsentchangerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+project}:reportConsentChange") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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{ - "project": c.project, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.reportConsentChange" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaProject.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsReportConsentChangeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProject, error) { +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15942,7 +19940,7 @@ func (c *ProjectsReportConsentChangeCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProject{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15955,59 +19953,73 @@ func (c *ProjectsReportConsentChangeCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsEstimateDataSizeCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EstimateDataSize: Estimates the data size to be used by a customer. +// Create: Creates a Document. // -// - location: Full resource name of the location, such as -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { - c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID to use +// for the Document, which becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1alphaestimatedatasizerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}:estimateDataSize") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16015,18 +20027,18 @@ func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.estimateDataSize" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.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 +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16045,7 +20057,7 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16058,23 +20070,24 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsGetAclConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetAclConfig: Gets the AclConfig. +// Delete: Deletes a Document. // -// - name: Resource name of AclConfig, such as -// `projects/*/locations/*/aclConfig`. If the caller does not have permission -// to access the AclConfig, regardless of whether or not it exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsGetAclConfigCall { - c := &ProjectsLocationsGetAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16082,45 +20095,34 @@ func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsG // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { 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 *ProjectsLocationsGetAclConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAclConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetAclConfigCall) Context(ctx context.Context) *ProjectsLocationsGetAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetAclConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetAclConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) 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 } @@ -16131,13 +20133,13 @@ func (c *ProjectsLocationsGetAclConfigCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.getAclConfig" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { +// *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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16156,7 +20158,7 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16169,64 +20171,71 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsUpdateAclConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// 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. +// Get: Gets a Document. // -// - name: Immutable. The full resource name of the acl configuration. Format: -// `projects/{project}/locations/{location}/aclConfig`. This field must be a -// UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsService) UpdateAclConfig(name string, googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig) *ProjectsLocationsUpdateAclConfigCall { - c := &ProjectsLocationsUpdateAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaaclconfig = googleclouddiscoveryenginev1alphaaclconfig return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsUpdateAclConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsUpdateAclConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsUpdateAclConfigCall) 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.googleclouddiscoveryenginev1alphaaclconfig) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16237,13 +20246,13 @@ func (c *ProjectsLocationsUpdateAclConfigCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.updateAclConfig" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16262,7 +20271,7 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16275,7 +20284,7 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16284,21 +20293,58 @@ type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { 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. +// GetProcessedDocument: Gets the parsed layout information for a Document. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ProcessedDocumentFormat sets the optional parameter +// "processedDocumentFormat": What format output should be. If unspecified, +// defaults to JSON. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. +// "JSON" - Output format is a JSON string representation of processed +// +// document. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) + return c +} + +// ProcessedDocumentType sets the optional parameter "processedDocumentType": +// Required. What type of processing to return. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. +// "PARSED_DOCUMENT" - Available for all data store parsing configs. +// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabled on the +// +// data store. +// +// "IMAGE_CONVERTED_DOCUMENT" - Returns the converted Image bytes (as JPEG or +// +// PNG) if available. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentType", processedDocumentType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16306,27 +20352,27 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16334,7 +20380,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(a 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/{+name}:getProcessedDocument") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16347,13 +20393,13 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument" 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 +// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16372,7 +20418,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16385,104 +20431,81 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + 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`. +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + if err != nil { + return nil, err + } 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}/documents:import") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" 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 +// *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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16501,7 +20524,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16514,100 +20537,53 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { s *Service - dataStore string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword suggestions. +// List: Gets a list of Documents. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16615,27 +20591,27 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16643,7 +20619,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16651,20 +20627,20 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse.Header // // or (if a response was returned at all) in error.(*googleapi.Error).Header. // // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16683,7 +20659,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16696,100 +20672,116 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) 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) + } } -// Create: Creates a DataStore. DataStore is for storing Documents. To serve -// these documents for Search, or Recommendation use case, an Engine needs to -// be created separately. +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { - c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user want to -// directly create an advanced data store for site search. If the data store is -// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE -// content_config), this flag will be ignored. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1alphadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.collections.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.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 +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16808,7 +20800,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16821,76 +20813,84 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsCollectionsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + 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/{+parent}/documents:purge") 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 "discoveryengine.projects.locations.collections.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" 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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16922,7 +20922,7 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsCollectionsDataStoresGetCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16931,16 +20931,16 @@ type ProjectsLocationsCollectionsDataStoresGetCall struct { header_ http.Header } -// Get: Gets a DataStore. +// Get: Gets a Document. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { - c := &ProjectsLocationsCollectionsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Chunk, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If +// the caller does not have permission to access the Chunk, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the +// requested Chunk does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16948,7 +20948,7 @@ func (r *ProjectsLocationsCollectionsDataStoresService) 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 *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16956,27 +20956,27 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16997,13 +20997,13 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17022,7 +21022,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaChunk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17035,30 +21035,53 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// List: Gets a list of Chunks. // -// - name: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/documentProcessingConfig`. -func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { - c := &ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent document resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to list Chunks under this document, regardless of +// whether or not this document exists, a `PERMISSION_DENIED` error is +// returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to +// return. If unspecified, defaults to 100. The maximum allowed value is 1000. +// Values above 1000 will be coerced to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListChunksResponse.next_page_token, received from a previous +// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ChunkService.ListChunks +// must match the call that provided the page token. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { + 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 *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17066,27 +21089,27 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) // 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 *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17094,7 +21117,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) 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/{+parent}/chunks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17102,18 +21125,18 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) } 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 "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17132,7 +21155,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17145,70 +21168,89 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) 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) + } } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall 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: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { 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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } @@ -17219,13 +21261,13 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { +// *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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17244,7 +21286,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17257,59 +21299,30 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresListCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// 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. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { - c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` -func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17317,27 +21330,27 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) 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 *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17345,7 +21358,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) 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/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17353,18 +21366,18 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) 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 "discoveryengine.projects.locations.collections.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.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 *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17383,7 +21396,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17396,92 +21409,87 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) 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 *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) 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 ProjectsLocationsCollectionsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { - c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DataStore to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) 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.googleclouddiscoveryenginev1alphadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17492,13 +21500,13 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17517,7 +21525,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17530,61 +21538,81 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { - s *Service - dataStore string - googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest - 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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) + } } -// TrainCustomModel: Trains a custom model. +type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports CompletionSuggestions for a DataStore. // -// - 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, googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { - c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - c.googleclouddiscoveryenginev1alphatraincustommodelrequest = googleclouddiscoveryenginev1alphatraincustommodelrequest +// - parent: The parent data store resource name for which to import customer +// autocomplete suggestions. Follows pattern +// `projects/*/locations/*/collections/*/dataStores/*`. +func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { + c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest return 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 { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { 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 { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { c.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 { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1alphatraincustommodelrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:trainCustomModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/completionSuggestions:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17592,18 +21620,18 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.import" 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) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17635,91 +21663,79 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. -// DocumentProcessingConfig is a singleon resource of DataStore. It's empty -// when DataStore is created. The first call to this method will set up -// DocumentProcessingConfig. +// Purge: Permanently deletes all CompletionSuggestions for a DataStore. // -// - name: The full resource name of the Document Processing Config. Format: -// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig -// `. -func (r *ProjectsLocationsCollectionsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c := &ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DocumentProcessingConfig to update. The following are the -// only supported fields: * DocumentProcessingConfig.ocr_config If not set, all -// supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent data store resource name for which to purge completion +// suggestions. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest) 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/{+parent}/completionSuggestions:purge") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, 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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17738,7 +21754,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17751,73 +21767,73 @@ func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17830,13 +21846,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17855,7 +21871,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17868,7 +21884,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { +type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17876,16 +21892,14 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Document. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17893,27 +21907,27 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -17931,13 +21945,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17969,7 +21983,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17978,16 +21992,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { header_ http.Header } -// Get: Gets a Document. +// Get: Gets a Control. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17995,7 +22006,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18003,27 +22014,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields( // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18044,13 +22055,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18069,7 +22080,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18082,67 +22093,55 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { +type ProjectsLocationsCollectionsDataStoresControlsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetProcessedDocument: Gets the parsed layout information for a Document. +// List: Lists all Controls by their parent DataStore. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// ProcessedDocumentFormat sets the optional parameter -// "processedDocumentFormat": What format output should be. If unspecified, -// defaults to JSON. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. -// "JSON" - Output format is a JSON string representation of processed -// -// document. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("filter", filter) return c } -// ProcessedDocumentType sets the optional parameter "processedDocumentType": -// Required. What type of processing to return. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. -// "PARSED_DOCUMENT" - Available for all data store parsing configs. -// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabled on the -// -// data store. -// -// "IMAGE_CONVERTED_DOCUMENT" - Returns the converted Image bytes (as JPEG or -// -// PNG) if available. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentType", processedDocumentType) +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18150,27 +22149,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18178,7 +22177,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18186,18 +22185,18 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu } 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18216,7 +22215,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18229,81 +22228,109 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) 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) + } } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.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 +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18322,7 +22349,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18335,110 +22362,83 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Documents. +// Converse: Converses a conversation. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) 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.googleclouddiscoveryenginev1alphaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18457,7 +22457,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18470,116 +22470,80 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) 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/{+parent}/conversations") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18598,7 +22562,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18611,84 +22575,74 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This process -// is asynchronous. Depending on the number of Documents to be deleted, this -// operation can take hours to complete. Before the delete operation completes, -// some Documents might still be returned by DocumentService.GetDocument or -// DocumentService.ListDocuments. To get a list of the Documents to be deleted, -// set PurgeDocumentsRequest.force to false. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) 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.googleclouddiscoveryenginev1alphapurgedocumentsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + 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 } 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18707,7 +22661,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18720,7 +22674,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18729,16 +22683,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct header_ http.Header } -// Get: Gets a Document. +// Get: Gets a Conversation. // -// - name: Full resource name of Chunk, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If -// the caller does not have permission to access the Chunk, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the -// requested Chunk does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18746,7 +22697,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) G // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18754,27 +22705,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18795,13 +22746,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) d return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18820,7 +22771,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18833,7 +22784,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) D return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18842,36 +22793,45 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall struc header_ http.Header } -// List: Gets a list of Chunks. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent document resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to list Chunks under this document, regardless of -// whether or not this document exists, a `PERMISSION_DENIED` error is -// returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to -// return. If unspecified, defaults to 100. The maximum allowed value is 1000. -// Values above 1000 will be coerced to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListChunksResponse.next_page_token, received from a previous -// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ChunkService.ListChunks -// must match the call that provided the page token. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18879,7 +22839,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18887,27 +22847,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18915,7 +22875,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18928,13 +22888,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18953,7 +22913,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18969,7 +22929,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18987,68 +22947,73 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) } } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + 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`. +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) 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("PATCH", urls, body) if err != nil { return nil, err } @@ -19059,13 +23024,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19084,7 +23049,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19097,7 +23062,118 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do( return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { +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, "v1alpha/{+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 +// *GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse, 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 := &GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse{ + 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 urlParams_ gensupport.URLParams @@ -19111,8 +23187,8 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19120,7 +23196,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(na // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19128,27 +23204,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19169,13 +23245,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19207,7 +23283,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19220,28 +23296,28 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19249,7 +23325,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19257,27 +23333,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19298,13 +23374,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19339,7 +23415,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -19357,79 +23433,85 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports CompletionSuggestions for a DataStore. +// 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. // -// - parent: The parent data store resource name for which to import customer -// autocomplete suggestions. Follows pattern -// `projects/*/locations/*/collections/*/dataStores/*`. -func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { - c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) 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}/completionSuggestions:import") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19461,79 +23543,104 @@ func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all CompletionSuggestions for a DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name for which to purge completion -// suggestions. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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}/completionSuggestions:purge") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.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 +// *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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19552,7 +23659,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19565,73 +23672,90 @@ func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) D return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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) + } } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Schema. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { - c.urlParams_.Set("controlId", controlId) +// SchemaId sets the optional parameter "schemaId": Required. The ID to use for +// the Schema, which becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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.googleclouddiscoveryenginev1alphacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19644,13 +23768,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.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 *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19669,7 +23793,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19682,7 +23806,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19690,14 +23814,13 @@ type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Control. If the Control to delete does not exist, a -// NOT_FOUND error is returned. +// Delete: Deletes a Schema. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19705,27 +23828,27 @@ func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -19743,13 +23866,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" 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 *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19768,7 +23891,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19781,7 +23904,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19790,13 +23913,13 @@ type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a Schema. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { - c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19804,7 +23927,7 @@ func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19812,27 +23935,27 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19853,13 +23976,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19878,7 +24001,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19891,7 +24014,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -19900,38 +24023,31 @@ type ProjectsLocationsCollectionsDataStoresControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Gets a list of Schemas. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { - c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19939,7 +24055,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19947,27 +24063,27 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...goo // 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19975,7 +24091,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19988,13 +24104,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20013,7 +24129,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20029,7 +24145,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...goog // 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20047,63 +24163,63 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx conte } } -type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Schema. // -// - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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.googleclouddiscoveryenginev1alphacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } @@ -20122,13 +24238,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.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 *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20147,7 +24263,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20160,66 +24276,68 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// 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 resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) 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.googleclouddiscoveryenginev1alphaconverseconversationrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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}:converse") + 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 } @@ -20230,13 +24348,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20255,7 +24373,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20268,80 +24386,104 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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}/conversations") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20360,7 +24502,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20373,74 +24515,103 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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) + } } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Answer: Answer query method. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1alphaanswerqueryrequest) + 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/{+servingConfig}:answer") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" 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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20459,7 +24630,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20472,7 +24643,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20481,13 +24652,14 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20495,7 +24667,7 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20503,27 +24675,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20544,13 +24716,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20569,7 +24741,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20582,7 +24754,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -20591,45 +24763,29 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the +// from a previous `ListServingConfigs` call. Provide this to retrieve the // subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20637,7 +24793,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20645,27 +24801,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20673,7 +24829,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20686,13 +24842,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He -// ader or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20711,7 +24867,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20727,7 +24883,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. // 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20745,34 +24901,32 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -20780,30 +24934,30 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) 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.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } @@ -20822,13 +24976,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20847,7 +25001,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20860,86 +25014,85 @@ 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 +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of all the custom models. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - 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 +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return 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 { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { 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 { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.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 { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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_) - } +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}/customModels") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") 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{ - "dataStore": c.dataStore, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20958,7 +25111,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20971,85 +25124,83 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + 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. +// Search: Performs a search. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1alphasearchrequest) + 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/{+servingConfig}:search") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" 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 +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21068,7 +25219,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21081,87 +25232,183 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } } -// List: Lists operations that match the specified filter in the request. If -// the server doesn't support this method, it returns `UNIMPLEMENTED`. +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1alphasession) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") + 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 "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, 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 := &GoogleCloudDiscoveryengineV1alphaSession{ + 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 ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. +// +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) 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 := 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 } @@ -21172,13 +25419,13 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21197,7 +25444,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21210,28 +25457,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21240,13 +25466,13 @@ type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { 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. +// Get: Gets a Session. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21254,7 +25480,7 @@ func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21262,27 +25488,27 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21303,13 +25529,13 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21328,7 +25554,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21341,41 +25567,54 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsListCall 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 all Sessions by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// 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: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21383,7 +25622,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21391,27 +25630,27 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21419,7 +25658,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt 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}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21427,18 +25666,18 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt } 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 "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21457,7 +25696,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21473,7 +25712,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go // 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -21491,169 +25730,71 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx con } } -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) 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.googleclouddiscoveryenginev1alphaschema) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") - 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 "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) 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 ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Schema. -// -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) 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, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -21664,13 +25805,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21689,7 +25830,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21702,7 +25843,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21711,13 +25852,13 @@ type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets a Answer. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21725,7 +25866,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21733,27 +25874,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googl // 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21774,13 +25915,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21799,7 +25940,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21812,86 +25953,63 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. This +// API sends all the target sites under site search engine for verification. // -// - parent: The parent data store resource name, in the format of +// - parent: The parent resource shared by all TargetSites being verified. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21902,13 +26020,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.Header -// 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21927,7 +26045,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21940,109 +26058,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) 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 ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Schema. -// -// - name: Immutable. The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. +// +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) 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/{+siteSearchEngine}:disableAdvancedSiteSearch") 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{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" 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 *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22074,85 +26163,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + 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. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + 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/{+siteSearchEngine}:enableAdvancedSiteSearch") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22184,41 +26268,45 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine 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`. +// FetchDomainVerificationStatus: Returns list of target sites with its domain +// verification status. This method can only be called under data store with +// BASIC_SITE_SEARCH state at the moment. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("filter", filter) +// - siteSearchEngine: The site search engine resource under which we fetch all +// the domain verification status. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `FetchDomainVerificationStatus` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to `FetchDomainVerificationStatus` must match the call that provided the +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -22226,7 +26314,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22234,27 +26322,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22262,7 +26350,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ 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/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22270,18 +26358,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse.Serve +// rResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22300,7 +26388,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22316,7 +26404,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt // 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -22334,82 +26422,85 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// GetUriPatternDocumentData: Gets the URI Pattern to Document data mapping for +// an Advanced Site Search DataStore. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) GetUriPatternDocumentData(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1alphaanswerqueryrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) 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/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:getUriPatternDocumentData") 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{ - "servingConfig": c.servingConfig, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.getUriPatternDocumentData" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineGetUriPatternDocumentDataCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22428,7 +26519,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22441,86 +26532,78 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { 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 *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1alpharecrawlurisrequest) + 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/{+siteSearchEngine}:recrawlUris") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.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 *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22539,7 +26622,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22552,101 +26635,79 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphaseturipatterndocumentdatarequest *GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// SetUriPatternDocumentData: Sets the URI Pattern to Document data mapping for +// an Advanced Site Search DataStore. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) SetUriPatternDocumentData(siteSearchEngine string, googleclouddiscoveryenginev1alphaseturipatterndocumentdatarequest *GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphaseturipatterndocumentdatarequest = googleclouddiscoveryenginev1alphaseturipatterndocumentdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall { 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall) 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.googleclouddiscoveryenginev1alphaseturipatterndocumentdatarequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:setUriPatternDocumentData") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.setUriPatternDocumentData" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineSetUriPatternDocumentDataCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22665,7 +26726,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22678,92 +26739,68 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) 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 ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// 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: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - 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 *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) 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.googleclouddiscoveryenginev1alphaservingconfig) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22774,13 +26811,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.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 *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22799,7 +26836,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22812,85 +26849,104 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Recommend: Makes a recommendation, which requires a contextual user event. -// -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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/{+servingConfig}:recommend") + 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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22909,7 +26965,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22922,64 +26978,82 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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) + } } -// Search: Performs a search. +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates TargetSite in a batch. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - parent: The parent resource shared by all TargetSites being created. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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.googleclouddiscoveryenginev1alphasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22987,18 +27061,18 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23017,7 +27091,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23030,82 +27104,60 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Create: Creates a TargetSite. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1alphasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23118,13 +27170,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23143,7 +27195,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23156,7 +27208,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23164,14 +27216,16 @@ type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Delete: Deletes a TargetSite. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23179,27 +27233,27 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -23217,13 +27271,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" 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 *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23242,7 +27296,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23255,7 +27309,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23264,13 +27318,16 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { header_ http.Header } -// Get: Gets a Session. +// Get: Gets a TargetSite. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23278,7 +27335,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23286,27 +27343,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23327,13 +27384,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23352,7 +27409,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23365,7 +27422,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23374,45 +27431,34 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Gets a list of TargetSites. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to list TargetSites under this site search engine, regardless of whether +// or not this branch exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// from a previous `ListTargetSites` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListTargetSites` must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23420,7 +27466,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23428,27 +27474,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...goo // 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23456,7 +27502,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23469,13 +27515,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23494,7 +27540,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23510,7 +27556,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog // 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23528,63 +27574,55 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx conte } } -type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a TargetSite. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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.googleclouddiscoveryenginev1alphasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) if err != nil { return nil, err } @@ -23603,13 +27641,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.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 *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23628,7 +27666,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23641,7 +27679,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23650,13 +27688,13 @@ type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { header_ http.Header } -// Get: Gets a Answer. +// 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 resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23664,7 +27702,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23672,27 +27710,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23713,13 +27751,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswer.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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23738,7 +27776,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23751,80 +27789,104 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. This -// API sends all the target sites under site search engine for verification. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent resource shared by all TargetSites being verified. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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}:batchVerifyTargetSites") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.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 +// *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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23843,7 +27905,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23856,61 +27918,81 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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) + } } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) 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.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23918,18 +28000,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23961,61 +28043,60 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24023,18 +28104,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24066,53 +28147,57 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its domain -// verification status. This method can only be called under data store with -// BASIC_SITE_SEARCH state at the moment. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. // -// - siteSearchEngine: The site search engine resource under which we fetch all -// the domain verification status. +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `FetchDomainVerificationStatus` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to `FetchDomainVerificationStatus` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageToken", pageToken) +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24120,27 +28205,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24148,7 +28233,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24156,18 +28241,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse.Serve -// rResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24186,7 +28271,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24199,80 +28284,64 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1alpharecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24280,18 +28349,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24323,214 +28392,83 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + 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. +// Purge: Deletes permanently all user events specified by the filter provided. +// Depending on the number of events specified by the filter, this operation +// could take hours or days to complete. To test a filter, use the list command +// first. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto +// res/${dataStoreId}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 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.collections.dataStores.siteSearchEngine.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" 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 +// *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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24549,7 +28487,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24562,82 +28500,71 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Write: Writes a single user event. // -// - parent: The parent resource shared by all TargetSites being created. +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent + return c +} + +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24650,13 +28577,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" 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 +// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24675,7 +28602,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24688,60 +28615,69 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Create: Creates a Engine. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// EngineId sets the optional parameter "engineId": Required. The ID to use for +// the Engine, which will become the final component of the Engine's resource +// name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) 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.googleclouddiscoveryenginev1alphatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24754,13 +28690,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24792,7 +28728,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24800,16 +28736,16 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall header_ http.Header } -// Delete: Deletes a TargetSite. +// Delete: Deletes a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. If the caller does not have permission to delete the +// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the Engine to delete does not exist, a NOT_FOUND error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24817,27 +28753,27 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -24855,13 +28791,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24893,7 +28829,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24902,16 +28838,13 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall st header_ http.Header } -// Get: Gets a TargetSite. +// Get: Gets a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24919,7 +28852,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24927,27 +28860,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24968,13 +28901,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24993,7 +28926,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25006,7 +28939,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsCollectionsEnginesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25015,34 +28948,31 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall s header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists all the Engines associated with the project. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to list TargetSites under this site search engine, regardless of whether -// or not this branch exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent 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. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// Filter sets the optional parameter "filter": Filter by solution type. For +// example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListTargetSites` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListTargetSites` must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25050,7 +28980,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25058,27 +28988,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25086,7 +29016,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25099,13 +29029,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25124,7 +29054,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25140,7 +29070,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25158,55 +29088,65 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Patch: Updates an Engine // -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The fully qualified resource name of the engine. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}` engine should be 1-63 characters, and valid characters are +// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Engine to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) 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.googleclouddiscoveryenginev1alphatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } @@ -25225,13 +29165,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25250,7 +29190,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25263,68 +29203,63 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest + urlParams_ gensupport.URLParams + 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. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesPauseCall) 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.googleclouddiscoveryenginev1alphapauseenginerequest) + 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/{+name}:pause") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25335,13 +29270,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" 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 +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25360,7 +29295,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25373,87 +29308,168 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest + urlParams_ gensupport.URLParams + 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`. +// Resume: Resumes the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - 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 *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesResumeCall) 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.googleclouddiscoveryenginev1alpharesumeenginerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") + 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 "discoveryengine.projects.locations.collections.engines.resume" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, 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 := &GoogleCloudDiscoveryengineV1alphaEngine{ + 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 ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. +// +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesTuneCall) 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.googleclouddiscoveryenginev1alphatuneenginerequest) + if err != nil { + return nil, err + } 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/{+name}:tune") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25464,13 +29480,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" 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 +// *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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25489,7 +29505,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25502,81 +29518,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) 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.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25589,13 +29597,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25614,7 +29622,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25627,79 +29635,74 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return ret, nil } -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) 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.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") + 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 } 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 "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25718,7 +29721,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25731,57 +29734,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { +type ProjectsLocationsCollectionsEnginesControlsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party domain. -// This method is used only by the Discovery Engine API JavaScript pixel and -// Google Tag Manager. Users should not call this method directly. +// Get: Gets a Control. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c := &ProjectsLocationsCollectionsEnginesControlsGetCall{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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25789,27 +29765,27 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25817,7 +29793,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25825,18 +29801,18 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( } 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 "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25855,7 +29831,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25868,66 +29844,93 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of user events. Request processing might be synchronous. -// Events that already exist are skipped. Use this method for backfilling -// historical user events. Operation.response is of type ImportResponse. Note -// that it is possible for a subset of the items to be successfully inserted. -// Operation.metadata is of type ImportMetadata. +// List: Lists all Controls by their parent DataStore. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { + 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { 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 *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1alphaimportusereventsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) 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}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -25938,13 +29941,13 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25963,7 +29966,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25976,83 +29979,109 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - 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 *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) 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) + } } -// Purge: Deletes permanently all user events specified by the filter provided. -// Depending on the number of events specified by the filter, this operation -// could take hours or days to complete. To test a filter, use the list command -// first. +type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - parent: The resource name of the catalog under which the events are -// created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) 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.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26071,7 +30100,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26084,71 +30113,64 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// Converse: Converses a conversation. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent - return c -} - -// WriteAsync sets the optional parameter "writeAsync": If set to true, the -// user event is written asynchronously after validation, and the API responds -// without waiting for the write. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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.googleclouddiscoveryenginev1alphauserevent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26156,18 +30178,18 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al } 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 "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26186,7 +30208,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26199,69 +30221,61 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine - return c -} - -// EngineId sets the optional parameter "engineId": Required. The ID to use for -// the Engine, which will become the final component of the Engine's resource -// name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { - c.urlParams_.Set("engineId", engineId) + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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.googleclouddiscoveryenginev1alphaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26274,13 +30288,13 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.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 +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26299,7 +30313,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26312,7 +30326,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26320,16 +30334,14 @@ type ProjectsLocationsCollectionsEnginesDeleteCall struct { header_ http.Header } -// Delete: Deletes a Engine. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. If the caller does not have permission to delete the -// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the Engine to delete does not exist, a NOT_FOUND error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26337,27 +30349,27 @@ func (r *ProjectsLocationsCollectionsEnginesService) Delete(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 *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -26375,13 +30387,13 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.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 *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26400,7 +30412,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26413,7 +30425,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesGetCall struct { +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26422,13 +30434,13 @@ type ProjectsLocationsCollectionsEnginesGetCall struct { header_ http.Header } -// Get: Gets a Engine. +// Get: Gets a Conversation. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26436,7 +30448,7 @@ func (r *ProjectsLocationsCollectionsEnginesService) Get(name 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 *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26444,27 +30456,27 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) 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 *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26485,13 +30497,13 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26510,7 +30522,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26523,7 +30535,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsCollectionsEnginesListCall struct { +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -26532,31 +30544,45 @@ type ProjectsLocationsCollectionsEnginesListCall struct { header_ http.Header } -// List: Lists all the Engines associated with the project. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { - c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter by solution type. For -// example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { +// 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26564,7 +30590,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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 *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26572,27 +30598,27 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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 *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26600,7 +30626,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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, "v1alpha/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26613,13 +30639,13 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26638,7 +30664,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26654,7 +30680,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // 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 *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -26672,34 +30698,34 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, } } -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: Immutable. The fully qualified resource name of the engine. This -// field must be a UTF-8 encoded string with a length limit of 1024 -// characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are -// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Engine to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -26707,30 +30733,30 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) 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.googleclouddiscoveryenginev1alphaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } @@ -26749,223 +30775,13 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, 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 := &GoogleCloudDiscoveryengineV1alphaEngine{ - 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 ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -// -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesPauseCall) 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.googleclouddiscoveryenginev1alphapauseenginerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}: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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, 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 := &GoogleCloudDiscoveryengineV1alphaEngine{ - 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 ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Resume: Resumes the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -// -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesResumeCall) 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.googleclouddiscoveryenginev1alpharesumeenginerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") - 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 "discoveryengine.projects.locations.collections.engines.resume" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26984,7 +30800,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26997,63 +30813,68 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. +// 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 resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) 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.googleclouddiscoveryenginev1alphatuneenginerequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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}:tune") + 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 } @@ -27064,13 +30885,13 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27102,92 +30923,104 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { - c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { - c.urlParams_.Set("controlId", controlId) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + 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 *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) 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.googleclouddiscoveryenginev1alphacontrol) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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}/controls") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.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 *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27206,7 +31039,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27219,74 +31052,103 @@ func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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) + } } -// Delete: Deletes a Control. If the Control to delete does not exist, a -// NOT_FOUND error is returned. +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Answer: Answer query method. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1alphaanswerqueryrequest) + 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/{+servingConfig}:answer") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" 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 *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27305,7 +31167,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27318,7 +31180,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsGetCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27327,13 +31189,14 @@ type ProjectsLocationsCollectionsEnginesControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { - c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27341,7 +31204,7 @@ func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name 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 *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27349,27 +31212,27 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googlea // 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 *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27390,13 +31253,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27415,7 +31278,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27428,7 +31291,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsListCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -27437,38 +31300,29 @@ type ProjectsLocationsCollectionsEnginesControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { - c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { - c.urlParams_.Set("filter", filter) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27476,7 +31330,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27484,27 +31338,27 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...google // 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 *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27512,7 +31366,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27525,13 +31379,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27550,7 +31404,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27566,7 +31420,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googlea // 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 *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27584,32 +31438,32 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context. } } -type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // // - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { - c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -27617,30 +31471,30 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(update // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) 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.googleclouddiscoveryenginev1alphacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } @@ -27659,13 +31513,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27684,7 +31538,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27697,64 +31551,174 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, 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 := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + 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 ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) 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.googleclouddiscoveryenginev1alphaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27762,18 +31726,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27792,7 +31756,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27805,61 +31769,82 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} // /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) 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.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27872,13 +31857,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27897,7 +31882,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27910,7 +31895,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27918,14 +31903,14 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: +// - name: The resource name of the Session to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27933,27 +31918,27 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -27971,13 +31956,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" 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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28009,7 +31994,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28018,13 +32003,13 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Session. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Session to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28032,7 +32017,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28040,27 +32025,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28081,13 +32066,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28106,7 +32091,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28119,7 +32104,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -28128,13 +32113,13 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} // /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -28142,7 +32127,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent st // Filter sets the optional parameter "filter": A filter to apply on the list // results. The supported features are: user_pseudo_id, state. Example: // "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -28150,23 +32135,23 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter // 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of results // to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28174,7 +32159,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28182,27 +32167,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...g // 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28210,7 +32195,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28223,13 +32208,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28248,7 +32233,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28264,7 +32249,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -28282,34 +32267,32 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx con } } -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -28317,30 +32300,30 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(u // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) 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.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) if err != nil { return nil, err } @@ -28359,13 +32342,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28384,7 +32367,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28397,7 +32380,227 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Answer. +// +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + 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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) 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.collections.engines.sessions.answers.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, 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 := &GoogleCloudDiscoveryengineV1alphaAnswer{ + 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 ProjectsLocationsCollectionsOperationsGetCall 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 *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{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 *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { + 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 *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsOperationsGetCall) 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.collections.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 *ProjectsLocationsCollectionsOperationsGetCall) 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 ProjectsLocationsCollectionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28406,21 +32609,40 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { 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 *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { + 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28428,27 +32650,27 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28456,7 +32678,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str 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/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28469,13 +32691,13 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.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 +// *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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28494,7 +32716,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28507,49 +32729,100 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsListCall 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 *ProjectsLocationsCollectionsOperationsListCall) 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 ProjectsLocationsDataStoresCompleteQueryCall struct { s *Service - name string + dataStore 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`. +// CompleteQuery: Completes the specified user input with keyword suggestions. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("filter", filter) +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28557,27 +32830,27 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28585,7 +32858,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st 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/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28593,18 +32866,20 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" 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 +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28623,7 +32898,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28636,84 +32911,81 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Create: Creates a DataStore. DataStore is for storing Documents. To serve +// these documents for Search, or Recommendation use case, an Engine needs to +// be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c } -// Answer: Answer query method. -// -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user want to +// directly create an advanced data store for site search. If the data store is +// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE +// content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCreateCall) 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.googleclouddiscoveryenginev1alphaanswerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28721,18 +32993,18 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header -// 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 *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28751,7 +33023,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28764,23 +33036,24 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// Delete: Deletes a DataStore. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28788,45 +33061,34 @@ func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { 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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) 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 } @@ -28837,13 +33099,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28862,7 +33124,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28875,46 +33137,33 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { +type ProjectsLocationsDataStoresGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// Get: Gets a DataStore. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28922,27 +33171,27 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28950,7 +33199,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28958,18 +33207,18 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al } 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 "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28988,7 +33237,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29001,92 +33250,68 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) 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 ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full DocumentProcessingConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/documentProcessingConfig`. +func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - 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 *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { 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 *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) 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.googleclouddiscoveryenginev1alphaservingconfig) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29097,13 +33322,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29122,7 +33347,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29135,85 +33360,87 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Recommend: Makes a recommendation, which requires a contextual user event. -// -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) 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/{+servingConfig}:recommend") + 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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Header or +// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29232,7 +33459,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29245,83 +33472,114 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists all the DataStores associated with the project. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. If +// the caller does not have permission to list DataStores under this +// location, regardless of whether or not this data store exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type . For +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { 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 *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) 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.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresListCall) 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/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") 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{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29340,7 +33598,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29356,9 +33614,9 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. // 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -29370,84 +33628,92 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Patch: Updates a DataStore // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { - c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + 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 *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresPatchCall) 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.googleclouddiscoveryenginev1alphasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29466,7 +33732,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29479,57 +33745,74 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. +// DocumentProcessingConfig is a singleon resource of DataStore. It's empty +// when DataStore is created. The first call to this method will set up +// DocumentProcessingConfig. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the Document Processing Config. Format: +// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig +// `. +func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DocumentProcessingConfig to update. The following are the +// only supported fields: * DocumentProcessingConfig.ocr_config If not set, all +// supported fields are updated. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + 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 *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) 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.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + 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("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -29540,13 +33823,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" 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 *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29565,7 +33848,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29578,85 +33861,92 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Session. +// Create: Creates a Document. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID to use +// for the Document, which becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { 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 *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + 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/{+parent}/documents") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29675,7 +33965,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29688,117 +33978,76 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// Delete: Deletes a Document. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { 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 *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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}/sessions") + 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 "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { +// *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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29811,111 +34060,90 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea }) } if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ - 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 *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) 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 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 ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Get: Gets a Document. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - 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 *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) 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.googleclouddiscoveryenginev1alphasession) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29926,13 +34154,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29951,7 +34179,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29964,7 +34192,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29973,21 +34201,58 @@ type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { header_ http.Header } -// Get: Gets a Answer. +// GetProcessedDocument: Gets the parsed layout information for a Document. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ProcessedDocumentFormat sets the optional parameter +// "processedDocumentFormat": What format output should be. If unspecified, +// defaults to JSON. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. +// "JSON" - Output format is a JSON string representation of processed +// +// document. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) + return c +} + +// ProcessedDocumentType sets the optional parameter "processedDocumentType": +// Required. What type of processing to return. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. +// "PARSED_DOCUMENT" - Available for all data store parsing configs. +// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabled on the +// +// data store. +// +// "IMAGE_CONVERTED_DOCUMENT" - Returns the converted Image bytes (as JPEG or +// +// PNG) if available. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentType", processedDocumentType) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29995,27 +34260,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30023,7 +34288,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(al 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/{+name}:getProcessedDocument") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30036,13 +34301,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30061,7 +34326,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ + ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30074,85 +34339,81 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + 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. +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { 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 *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + 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/{+parent}/documents:import") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" 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 *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30184,41 +34445,45 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsListCall 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: Gets a list of Documents. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -30226,7 +34491,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30234,27 +34499,27 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) 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 *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30262,7 +34527,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30270,18 +34535,20 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( } 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 "discoveryengine.projects.locations.collections.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.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 +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30300,7 +34567,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30316,7 +34583,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca // 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 *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -30334,136 +34601,95 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Conte } } -type ProjectsLocationsDataStoresCompleteQueryCall struct { - s *Service - dataStore string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword suggestions. +// Patch: Updates a Document. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument return c } -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { 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 *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompleteQueryCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + 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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30482,7 +34708,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30495,81 +34721,65 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To serve -// these documents for Search, or Recommendation use case, an Engine needs to -// be created separately. +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. // // - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore - return c -} - -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user want to -// directly create an advanced data store for site search. If the data store is -// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE -// content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) - return c -} - -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) 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.googleclouddiscoveryenginev1alphadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -30582,13 +34792,13 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" 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 *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30620,24 +34830,25 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Get: Gets a Document. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Chunk, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If +// the caller does not have permission to access the Chunk, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the +// requested Chunk does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30645,34 +34856,45 @@ func (r *ProjectsLocationsDataStoresService) 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 *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) 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 } @@ -30683,13 +34905,13 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.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 +// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30708,7 +34930,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaChunk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30721,33 +34943,53 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a DataStore. +// List: Gets a list of Chunks. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent document resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to list Chunks under this document, regardless of +// whether or not this document exists, a `PERMISSION_DENIED` error is +// returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to +// return. If unspecified, defaults to 100. The maximum allowed value is 1000. +// Values above 1000 will be coerced to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListChunksResponse.next_page_token, received from a previous +// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ChunkService.ListChunks +// must match the call that provided the page token. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + 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 *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30755,27 +34997,27 @@ func (c *ProjectsLocationsDataStoresGetCall) 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 *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30783,7 +35025,7 @@ func (c *ProjectsLocationsDataStoresGetCall) 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/{+parent}/chunks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30791,18 +35033,18 @@ func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Respon } 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 "discoveryengine.projects.locations.dataStores.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30821,7 +35063,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30834,68 +35076,89 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) 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) + } } -// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +type ProjectsLocationsDataStoresBranchesOperationsCancelCall 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: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/documentProcessingConfig`. -func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{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 *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { 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 *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } @@ -30906,13 +35169,13 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +// *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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30931,7 +35194,7 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30944,7 +35207,7 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30953,15 +35216,13 @@ type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// 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: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30969,7 +35230,7 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30977,27 +35238,27 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googlea // 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31018,13 +35279,13 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31043,7 +35304,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31056,51 +35317,41 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -31108,7 +35359,7 @@ func (c *ProjectsLocationsDataStoresListCall) 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 *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31116,27 +35367,27 @@ func (c *ProjectsLocationsDataStoresListCall) 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 *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31144,7 +35395,7 @@ func (c *ProjectsLocationsDataStoresListCall) 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/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31152,18 +35403,18 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } 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 "discoveryengine.projects.locations.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.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 +// *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 *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31182,7 +35433,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31198,7 +35449,7 @@ func (c *ProjectsLocationsDataStoresListCall) 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 *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -31216,88 +35467,79 @@ func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompletionSuggestionsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Import: Imports CompletionSuggestions for a DataStore. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DataStore to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent data store resource name for which to import customer +// autocomplete suggestions. Follows pattern +// `projects/*/locations/*/collections/*/dataStores/*`. +func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { + c := &ProjectsLocationsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1alphadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest) 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/{+parent}/completionSuggestions:import") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.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 *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31316,7 +35558,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31329,91 +35571,79 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. -// DocumentProcessingConfig is a singleon resource of DataStore. It's empty -// when DataStore is created. The first call to this method will set up -// DocumentProcessingConfig. +// Purge: Permanently deletes all CompletionSuggestions for a DataStore. // -// - name: The full resource name of the Document Processing Config. Format: -// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig -// `. -func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DocumentProcessingConfig to update. The following are the -// only supported fields: * DocumentProcessingConfig.ocr_config If not set, all -// supported fields are updated. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent data store resource name for which to purge completion +// suggestions. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { + c := &ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest) 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/{+parent}/completionSuggestions:purge") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, 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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31432,7 +35662,7 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31445,73 +35675,73 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsCreateCall { + c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31524,13 +35754,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31549,7 +35779,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31562,7 +35792,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { +type ProjectsLocationsDataStoresControlsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -31570,16 +35800,14 @@ type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Document. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { + c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -31587,27 +35815,27 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -31625,13 +35853,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31663,7 +35891,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -31672,16 +35900,13 @@ type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { header_ http.Header } -// Get: Gets a Document. +// Get: Gets a Control. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { + c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -31689,7 +35914,7 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31697,27 +35922,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...google // 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31738,13 +35963,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31763,7 +35988,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31776,67 +36001,55 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { +type ProjectsLocationsDataStoresControlsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetProcessedDocument: Gets the parsed layout information for a Document. +// List: Lists all Controls by their parent DataStore. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { + c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// ProcessedDocumentFormat sets the optional parameter -// "processedDocumentFormat": What format output should be. If unspecified, -// defaults to JSON. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. -// "JSON" - Output format is a JSON string representation of processed -// -// document. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { + c.urlParams_.Set("filter", filter) return c } -// ProcessedDocumentType sets the optional parameter "processedDocumentType": -// Required. What type of processing to return. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. -// "PARSED_DOCUMENT" - Available for all data store parsing configs. -// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabled on the -// -// data store. -// -// "IMAGE_CONVERTED_DOCUMENT" - Returns the converted Image bytes (as JPEG or -// -// PNG) if available. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentType", processedDocumentType) +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31844,27 +36057,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31872,7 +36085,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) d var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31880,18 +36093,18 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) d } 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 "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31910,7 +36123,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31923,81 +36136,109 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) D return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - 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 *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) 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) + } } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +type ProjectsLocationsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsPatchCall { + c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsPatchCall) 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.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.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 +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32016,7 +36257,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32029,110 +36270,83 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Documents. +// Converse: Converses a conversation. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) 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 *ProjectsLocationsDataStoresConversationsConverseCall) 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.googleclouddiscoveryenginev1alphaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32151,7 +36365,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32164,116 +36378,80 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) 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 ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) 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/{+parent}/conversations") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32292,7 +36470,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32305,84 +36483,74 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This process -// is asynchronous. Depending on the number of Documents to be deleted, this -// operation can take hours to complete. Before the delete operation completes, -// some Documents might still be returned by DocumentService.GetDocument or -// DocumentService.ListDocuments. To get a list of the Documents to be deleted, -// set PurgeDocumentsRequest.force to false. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{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 *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) 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.googleclouddiscoveryenginev1alphapurgedocumentsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + 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 } 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 "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.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 *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32401,7 +36569,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32414,7 +36582,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { +type ProjectsLocationsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32423,16 +36591,13 @@ type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { header_ http.Header } -// Get: Gets a Document. +// Get: Gets a Conversation. // -// - name: Full resource name of Chunk, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If -// the caller does not have permission to access the Chunk, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the -// requested Chunk does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32440,7 +36605,7 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32448,27 +36613,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32489,13 +36654,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32514,7 +36679,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32527,7 +36692,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { +type ProjectsLocationsDataStoresConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -32536,36 +36701,45 @@ type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { header_ http.Header } -// List: Gets a list of Chunks. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent document resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to list Chunks under this document, regardless of -// whether or not this document exists, a `PERMISSION_DENIED` error is -// returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to -// return. If unspecified, defaults to 100. The maximum allowed value is 1000. -// Values above 1000 will be coerced to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListChunksResponse.next_page_token, received from a previous -// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ChunkService.ListChunks -// must match the call that provided the page token. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -32573,7 +36747,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(p // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32581,27 +36755,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32609,7 +36783,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(a var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32622,13 +36796,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32647,7 +36821,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32663,7 +36837,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... // 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 *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { +func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -32681,68 +36855,73 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx c } } -type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + 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`. +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) 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("PATCH", urls, body) if err != nil { return nil, err } @@ -32753,13 +36932,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32778,7 +36957,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32791,7 +36970,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32805,8 +36984,8 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32814,7 +36993,7 @@ func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32822,27 +37001,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32863,13 +37042,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32901,7 +37080,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32914,28 +37093,28 @@ type ProjectsLocationsDataStoresBranchesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -32943,7 +37122,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32951,27 +37130,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32992,13 +37171,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33033,7 +37212,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -33051,79 +37230,85 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } -type ProjectsLocationsDataStoresCompletionSuggestionsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports CompletionSuggestions for a DataStore. +// 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. // -// - parent: The parent data store resource name for which to import customer -// autocomplete suggestions. Follows pattern -// `projects/*/locations/*/collections/*/dataStores/*`. -func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { - c := &ProjectsLocationsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{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 *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1alphaimportcompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresOperationsGetCall) 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}/completionSuggestions:import") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.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 *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33155,79 +37340,104 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all CompletionSuggestions for a DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name for which to purge completion -// suggestions. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { - c := &ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgecompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresOperationsListCall) 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}/completionSuggestions:purge") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.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 +// *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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33246,7 +37456,7 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33259,73 +37469,90 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataStoresControlsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - 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 *ProjectsLocationsDataStoresOperationsListCall) 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) + } } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Schema. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsCreateCall { - c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { - c.urlParams_.Set("controlId", controlId) +// SchemaId sets the optional parameter "schemaId": Required. The ID to use for +// the Schema, which becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) 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.googleclouddiscoveryenginev1alphacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33338,13 +37565,13 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.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 *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33363,7 +37590,7 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33376,7 +37603,7 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresControlsDeleteCall struct { +type ProjectsLocationsDataStoresSchemasDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -33384,14 +37611,13 @@ type ProjectsLocationsDataStoresControlsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Control. If the Control to delete does not exist, a -// NOT_FOUND error is returned. +// Delete: Deletes a Schema. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { - c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -33399,27 +37625,27 @@ func (r *ProjectsLocationsDataStoresControlsService) Delete(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 *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -33437,13 +37663,13 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" 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 *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33462,7 +37688,7 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33475,7 +37701,7 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresControlsGetCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -33484,13 +37710,13 @@ type ProjectsLocationsDataStoresControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a Schema. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { - c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -33498,7 +37724,7 @@ func (r *ProjectsLocationsDataStoresControlsService) Get(name 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 *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33506,27 +37732,27 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) 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 *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -33547,13 +37773,13 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33572,7 +37798,7 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33585,7 +37811,7 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataStoresControlsListCall struct { +type ProjectsLocationsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -33594,38 +37820,31 @@ type ProjectsLocationsDataStoresControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Gets a list of Schemas. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { - c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -33633,7 +37852,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33641,27 +37860,27 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -33669,7 +37888,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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, "v1alpha/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -33682,13 +37901,13 @@ func (c *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33707,7 +37926,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33723,7 +37942,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallO // 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 *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -33741,63 +37960,63 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, } } -type ProjectsLocationsDataStoresControlsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Schema. // -// - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsPatchCall { - c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) 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.googleclouddiscoveryenginev1alphacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } @@ -33816,13 +38035,13 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaControl.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 *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33841,7 +38060,7 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33854,83 +38073,319 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Answer: Answer query method. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1alphaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + 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 ProjectsLocationsDataStoresServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. +// +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{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 *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { + 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 *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) 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.dataStores.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerResponse -// .Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, 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 := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + 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 ProjectsLocationsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all ServingConfigs linked to this dataStore. +// +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { + 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 *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { + 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 *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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}/servingConfigs") + 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.servingConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.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 *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33949,7 +38404,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33962,80 +38417,109 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - 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 *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) 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 ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { + 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 *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) 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.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34054,7 +38538,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34067,74 +38551,85 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) + 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/{+servingConfig}:recommend") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" 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 *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34153,7 +38648,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34166,85 +38661,83 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Search: Performs a search. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { 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 *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) 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 *ProjectsLocationsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1alphasearchrequest) + 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/{+servingConfig}:search") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34263,7 +38756,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34276,100 +38769,84 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataStoresConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } } -// List: Lists all Conversations by their parent DataStore. +type ProjectsLocationsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - parent: The data store resource name. Format: +// - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} // /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsCreateCall { + c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { 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 *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) 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 *ProjectsLocationsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1alphasession) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -34380,13 +38857,13 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34405,7 +38882,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34418,94 +38895,57 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. 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 *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) 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 ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - 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 *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) 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.googleclouddiscoveryenginev1alphaconversation) - 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 } @@ -34516,13 +38956,13 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// *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 *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34541,7 +38981,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34554,7 +38994,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34563,13 +39003,13 @@ type ProjectsLocationsDataStoresModelsOperationsGetCall struct { 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. +// Get: Gets a Session. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { + c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34577,7 +39017,7 @@ func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34585,27 +39025,27 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googlea // 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34626,13 +39066,13 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34651,7 +39091,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34664,41 +39104,54 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsDataStoresSessionsListCall 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 all Sessions by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { + c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { +// 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: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -34706,7 +39159,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34714,27 +39167,27 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...google // 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 *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34742,7 +39195,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri 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}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -34750,18 +39203,18 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri } 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 "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34780,7 +39233,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34796,7 +39249,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -34814,68 +39267,71 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context. } } -type ProjectsLocationsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + 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. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsPatchCall { + c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { + 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 *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) 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 *ProjectsLocationsDataStoresSessionsPatchCall) 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.googleclouddiscoveryenginev1alphasession) + 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 } @@ -34886,13 +39342,13 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34911,7 +39367,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34924,7 +39380,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34933,40 +39389,21 @@ type ProjectsLocationsDataStoresOperationsListCall struct { 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`. +// Get: Gets a Answer. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { - 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 *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34974,27 +39411,27 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -35002,7 +39439,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35015,13 +39452,13 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35040,7 +39477,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35053,90 +39490,61 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal 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 *ProjectsLocationsDataStoresOperationsListCall) 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 ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c -} - -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -35144,18 +39552,18 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch" 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 *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35187,73 +39595,80 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + 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/{+siteSearchEngine}:enableAdvancedSiteSearch") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch" 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 *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35285,85 +39700,78 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { 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 *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1alpharecrawlurisrequest) + 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/{+siteSearchEngine}:recrawlUris") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.recrawlUris" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSchema.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 *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35382,7 +39790,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35395,86 +39803,63 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// BatchCreate: Creates TargetSite in a batch. // -// - parent: The parent data store resource name, in the format of +// - parent: The parent resource shared by all TargetSites being created. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { 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 *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -35485,13 +39870,13 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.Header -// 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 *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35510,7 +39895,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35523,109 +39908,79 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp 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 *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) 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 ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// Create: Creates a TargetSite. // -// - name: Immutable. The full resource name of the schema, in the format of +// - parent: Parent resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) 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/{+parent}/targetSites") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.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 *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35657,82 +40012,76 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Delete: Deletes a TargetSite. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall{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 *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) 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.googleclouddiscoveryenginev1alphaanswerqueryrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") + 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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header -// 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 *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35751,7 +40100,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35764,7 +40113,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresServingConfigsGetCall struct { +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -35773,14 +40122,16 @@ type ProjectsLocationsDataStoresServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// Get: Gets a TargetSite. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -35788,7 +40139,7 @@ func (r *ProjectsLocationsDataStoresServingConfigsService) 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 *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35796,27 +40147,27 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) 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 *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -35837,13 +40188,13 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35862,7 +40213,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35875,7 +40226,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataStoresServingConfigsListCall struct { +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -35884,29 +40235,34 @@ type ProjectsLocationsDataStoresServingConfigsListCall struct { header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Gets a list of TargetSites. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { - c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to list TargetSites under this site search engine, regardless of whether +// or not this branch exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { +// from a previous `ListTargetSites` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListTargetSites` must match the call that provided the page token. +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -35914,7 +40270,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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 *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35922,27 +40278,27 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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 *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -35950,7 +40306,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35963,13 +40319,13 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.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 *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35988,7 +40344,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36004,7 +40360,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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 *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -36022,63 +40378,55 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Co } } -type ProjectsLocationsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Patch: Updates a TargetSite. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) 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.googleclouddiscoveryenginev1alphaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) if err != nil { return nil, err } @@ -36097,13 +40445,13 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.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 *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36122,7 +40470,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36135,66 +40483,60 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) 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.googleclouddiscoveryenginev1alpharecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36202,18 +40544,18 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36232,7 +40574,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36245,64 +40587,60 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) 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.googleclouddiscoveryenginev1alphasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36310,18 +40648,18 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.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 *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36340,7 +40678,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36353,84 +40691,95 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea 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 *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.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.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsCreateCall { - c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { 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 *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1alphasession) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) 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}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -36441,13 +40790,13 @@ func (c *ProjectsLocationsDataStoresSessionsCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36466,7 +40815,7 @@ func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36479,74 +40828,83 @@ func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { + c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1alphaimportusereventsrequest) + 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/{+parent}/userEvents:import") 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 "discoveryengine.projects.locations.dataStores.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.import" 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 *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36565,7 +40923,7 @@ func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36578,85 +40936,83 @@ func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresSessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Session. -// -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { - c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Purge: Deletes permanently all user events specified by the filter provided. +// Depending on the number of events specified by the filter, this operation +// could take hours or days to complete. To test a filter, use the list command +// first. +// +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto +// res/${dataStoreId}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsPurgeCall { 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 *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsGetCall) 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 *ProjectsLocationsDataStoresUserEventsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + 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/{+parent}/userEvents:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.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 *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36675,7 +41031,7 @@ func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36688,100 +41044,73 @@ func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataStoresSessionsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// Write: Writes a single user event. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { - c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { 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 *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsListCall) 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 *ProjectsLocationsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1alphauserevent) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -36792,13 +41121,13 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.write" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36817,7 +41146,7 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36830,109 +41159,79 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) 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 *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) 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 ProjectsLocationsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaevaluation *GoogleCloudDiscoveryengineV1alphaEvaluation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Create: Creates a Evaluation. Upon creation, the evaluation will be +// automatically triggered and begin execution. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsPatchCall { - c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEvaluationsService) Create(parent string, googleclouddiscoveryenginev1alphaevaluation *GoogleCloudDiscoveryengineV1alphaEvaluation) *ProjectsLocationsEvaluationsCreateCall { + c := &ProjectsLocationsEvaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaevaluation = googleclouddiscoveryenginev1alphaevaluation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsEvaluationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsEvaluationsCreateCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsCreateCall) 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.googleclouddiscoveryenginev1alphasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaevaluation) 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/{+parent}/evaluations") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.evaluations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaSession.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 *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { +func (c *ProjectsLocationsEvaluationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36951,7 +41250,7 @@ func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36964,7 +41263,7 @@ func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { +type ProjectsLocationsEvaluationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36973,13 +41272,15 @@ type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { header_ http.Header } -// Get: Gets a Answer. +// Get: Gets a Evaluation. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Evaluation, such as +// `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the +// caller does not have permission to access the Evaluation, regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. If the +// requested Evaluation does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall { + c := &ProjectsLocationsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36987,7 +41288,7 @@ func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36995,27 +41296,27 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37036,13 +41337,13 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.evaluations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaEvaluation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { +func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37061,7 +41362,7 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ + ret := &GoogleCloudDiscoveryengineV1alphaEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37074,80 +41375,106 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +// List: Gets a list of Evaluations. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest +// - parent: The parent location resource name, such as +// `projects/{project}/locations/{location}`. If the caller does not have +// permission to list Evaluations under this location, regardless of whether +// or not this location exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { + c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Evaluations to return. If unspecified, defaults to 100. The maximum allowed +// value is 1000. Values above 1000 will be coerced to 1000. If this field is +// negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListEvaluationsResponse.next_page_token, received from a previous +// EvaluationService.ListEvaluations call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// EvaluationService.ListEvaluations must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { 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 *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsListCall) 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/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/evaluations") 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{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse.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 *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37166,7 +41493,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37179,80 +41506,128 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCal return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest - 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 *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEvaluationsResponse) 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) + } } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +type ProjectsLocationsEvaluationsListResultsCall struct { + s *Service + evaluation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListResults: Gets a list of results for a given a Evaluation. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest +// - evaluation: The evaluation resource name, such as +// `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the +// caller does not have permission to list EvaluationResult under this +// evaluation, regardless of whether or not this evaluation set exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsEvaluationsService) ListResults(evaluation string) *ProjectsLocationsEvaluationsListResultsCall { + c := &ProjectsLocationsEvaluationsListResultsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.evaluation = evaluation + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// EvaluationResult to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If this +// field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListResultsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListEvaluationResultsResponse.next_page_token, received from a previous +// EvaluationService.ListEvaluationResults call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// EvaluationService.ListEvaluationResults must match the call that provided +// the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListResultsCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsListResultsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListResultsCall { 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 *ProjectsLocationsEvaluationsListResultsCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListResultsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsListResultsCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListResultsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsListResultsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsListResultsCall) 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/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+evaluation}:listResults") 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{ - "siteSearchEngine": c.siteSearchEngine, + "evaluation": c.evaluation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.evaluations.listResults" 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 *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37271,7 +41646,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37284,78 +41659,106 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest - 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 *ProjectsLocationsEvaluationsListResultsCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEvaluationResultsResponse) 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) + } } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +type ProjectsLocationsEvaluationsOperationsGetCall 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. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { + c := &ProjectsLocationsEvaluationsOperationsGetCall{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 *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { 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 *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1alpharecrawlurisrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsOperationsGetCall) 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/{+siteSearchEngine}:recrawlUris") + 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{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37387,61 +41790,59 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGroundingConfigsCheckCall struct { + s *Service + groundingConfig string + googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Check: Performs a grounding check. // -// - parent: The parent resource shared by all TargetSites being created. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest +// - groundingConfig: The resource name of the grounding config, such as +// `projects/*/locations/global/groundingConfigs/default_grounding_config`. +func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { + c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groundingConfig = groundingConfig + c.googleclouddiscoveryenginev1alphacheckgroundingrequest = googleclouddiscoveryenginev1alphacheckgroundingrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsGroundingConfigsCheckCall) 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.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacheckgroundingrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+groundingConfig}:check") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -37449,18 +41850,18 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "groundingConfig": c.groundingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" 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 +// *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37479,7 +41880,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37492,79 +41893,85 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIdentityMappingStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// 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. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite +// - name: The name of the operation resource. +func (r *ProjectsLocationsIdentityMappingStoresOperationsService) Get(name string) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + c := &ProjectsLocationsIdentityMappingStoresOperationsGetCall{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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { 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 *ProjectsLocationsIdentityMappingStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIdentityMappingStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1alphatargetsite) - if err != nil { - return nil, err +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) 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}/targetSites") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.identity_mapping_stores.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIdentityMappingStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37596,59 +42003,87 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(op return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIdentityMappingStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetSite. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsIdentityMappingStoresOperationsService) List(name string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c := &ProjectsLocationsIdentityMappingStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Filter(filter string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIdentityMappingStoresOperationsListCall { 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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIdentityMappingStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIdentityMappingStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) 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 := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -37659,13 +42094,13 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.identity_mapping_stores.operations.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 +// *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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIdentityMappingStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37684,7 +42119,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37697,7 +42132,28 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(op return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall 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 *ProjectsLocationsIdentityMappingStoresOperationsListCall) 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 ProjectsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37706,16 +42162,13 @@ type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall struct { header_ http.Header } -// Get: Gets a TargetSite. +// 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: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -37723,7 +42176,7 @@ func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37731,27 +42184,27 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) 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_) @@ -37772,13 +42225,13 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.get" call. +// Do executes the "discoveryengine.projects.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaTargetSite.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { +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 { @@ -37797,7 +42250,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37810,43 +42263,41 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to list TargetSites under this site search engine, regardless of whether -// or not this branch exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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 } -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +// 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": A page token, received -// from a previous `ListTargetSites` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListTargetSites` must match the call that provided the page token. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +// 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 } @@ -37854,7 +42305,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37862,27 +42313,27 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields( // 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +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_) @@ -37890,7 +42341,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doReque var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -37898,18 +42349,18 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doReque } 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 "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.list" call. +// Do executes the "discoveryengine.projects.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, 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 { @@ -37928,7 +42379,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37944,7 +42395,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts // 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -37962,80 +42413,79 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(c } } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRankingConfigsRankCall struct { + s *Service + rankingConfig string + googleclouddiscoveryenginev1alpharankrequest *GoogleCloudDiscoveryengineV1alphaRankRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Rank: Ranks a list of text records based on the given input query. // -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite +// - rankingConfig: The resource name of the rank service config, such as +// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank +// ing_config`. +func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1alpharankrequest *GoogleCloudDiscoveryengineV1alphaRankRequest) *ProjectsLocationsRankingConfigsRankCall { + c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.rankingConfig = rankingConfig + c.googleclouddiscoveryenginev1alpharankrequest = googleclouddiscoveryenginev1alpharankrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsRankingConfigsRankCall) Fields(s ...googleapi.Field) *ProjectsLocationsRankingConfigsRankCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsRankingConfigsRankCall) Context(ctx context.Context) *ProjectsLocationsRankingConfigsRankCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsRankingConfigsRankCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRankingConfigsRankCall) 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.googleclouddiscoveryenginev1alphatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharankrequest) 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/{+rankingConfig}:rank") 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{ - "name": c.name, + "rankingConfig": c.rankingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.rankingConfigs.rank" 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 +// *GoogleCloudDiscoveryengineV1alphaRankResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRankResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38054,7 +42504,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaRankResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38067,60 +42517,59 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opt return ret, nil } -type ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRequirementsCheckRequirementCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// CheckRequirement: Check a particular requirement. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest +// - location: Full resource name of the location. Format +// `projects/{project_number_or_id}/locations/{location}`. +func (r *ProjectsLocationsRequirementsService) CheckRequirement(location string, googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest) *ProjectsLocationsRequirementsCheckRequirementCall { + c := &ProjectsLocationsRequirementsCheckRequirementCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphacheckrequirementrequest = googleclouddiscoveryenginev1alphacheckrequirementrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Fields(s ...googleapi.Field) *ProjectsLocationsRequirementsCheckRequirementCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Context(ctx context.Context) *ProjectsLocationsRequirementsCheckRequirementCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRequirementsCheckRequirementCall) 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.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacheckrequirementrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/requirements:checkRequirement") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38128,18 +42577,18 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "location": c.location, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.requirements.checkRequirement" 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 *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRequirementsCheckRequirementCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38158,7 +42607,7 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38171,60 +42620,73 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasamplequeryset *GoogleCloudDiscoveryengineV1alphaSampleQuerySet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +// Create: Creates a SampleQuerySet // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsSampleQuerySetsService) Create(parent string, googleclouddiscoveryenginev1alphasamplequeryset *GoogleCloudDiscoveryengineV1alphaSampleQuerySet) *ProjectsLocationsSampleQuerySetsCreateCall { + c := &ProjectsLocationsSampleQuerySetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1alphasamplequeryset = googleclouddiscoveryenginev1alphasamplequeryset + return c +} + +// SampleQuerySetId sets the optional parameter "sampleQuerySetId": Required. +// The ID to use for the SampleQuerySet, which will become the final component +// of the SampleQuerySet.name. If the caller does not have permission to create +// the SampleQuerySet, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique among all +// SampleQuerySets with the same parent. Otherwise, an `ALREADY_EXISTS` error +// is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsCreateCall) SampleQuerySetId(sampleQuerySetId string) *ProjectsLocationsSampleQuerySetsCreateCall { + c.urlParams_.Set("sampleQuerySetId", sampleQuerySetId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) 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.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasamplequeryset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sampleQuerySets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38237,13 +42699,13 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 +// *GoogleCloudDiscoveryengineV1alphaSampleQuerySet.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38262,7 +42724,7 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38275,112 +42737,76 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party domain. -// This method is used only by the Discovery Engine API JavaScript pixel and -// Google Tag Manager. Users should not call this method directly. +// Delete: Deletes a SampleQuerySet. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// - name: Full resource name of SampleQuerySet, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to delete the SampleQuerySet, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error is +// returned. If the SampleQuerySet to delete does not exist, a `NOT_FOUND` +// error is returned. +func (r *ProjectsLocationsSampleQuerySetsService) Delete(name string) *ProjectsLocationsSampleQuerySetsDeleteCall { + c := &ProjectsLocationsSampleQuerySetsDeleteCall{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 *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsDeleteCall { 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 *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) 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}/userEvents:collect") + 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 "discoveryengine.projects.locations.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38399,7 +42825,7 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38412,83 +42838,88 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of user events. Request processing might be synchronous. -// Events that already exist are skipped. Use this method for backfilling -// historical user events. Operation.response is of type ImportResponse. Note -// that it is possible for a subset of the items to be successfully inserted. -// Operation.metadata is of type ImportMetadata. +// Get: Gets a SampleQuerySet. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { - c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest +// - name: Full resource name of SampleQuerySet, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to access the SampleQuerySet, +// regardless of whether or not it exists, a PERMISSION_DENIED error is +// returned. If the requested SampleQuerySet does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsSampleQuerySetsService) Get(name string) *ProjectsLocationsSampleQuerySetsGetCall { + c := &ProjectsLocationsSampleQuerySetsGetCall{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 *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsGetCall { 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 *ProjectsLocationsSampleQuerySetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1alphaimportusereventsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSampleQuerySetsGetCall) 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}/userEvents:import") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 +// *GoogleCloudDiscoveryengineV1alphaSampleQuerySet.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38507,7 +42938,7 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38520,66 +42951,90 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataStoresUserEventsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Deletes permanently all user events specified by the filter provided. -// Depending on the number of events specified by the filter, this operation -// could take hours or days to complete. To test a filter, use the list command -// first. +// List: Gets a list of SampleQuerySets. // -// - parent: The resource name of the catalog under which the events are -// created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/dataSto -// res/${dataStoreId}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsDataStoresUserEventsPurgeCall { - c := &ProjectsLocationsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent location resource name, such as +// `projects/{project}/locations/{location}`. If the caller does not have +// permission to list SampleQuerySets under this location, regardless of +// whether or not this location exists, a `PERMISSION_DENIED` error is +// returned. +func (r *ProjectsLocationsSampleQuerySetsService) List(parent string) *ProjectsLocationsSampleQuerySetsListCall { + c := &ProjectsLocationsSampleQuerySetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SampleQuerySets to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If this +// field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsListCall) PageSize(pageSize int64) *ProjectsLocationsSampleQuerySetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListSampleQuerySetsResponse.next_page_token, received from a previous +// SampleQuerySetService.ListSampleQuerySets call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SampleQuerySetService.ListSampleQuerySets must match the call that provided +// the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsListCall) PageToken(pageToken string) *ProjectsLocationsSampleQuerySetsListCall { + 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 *ProjectsLocationsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsListCall { 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 *ProjectsLocationsSampleQuerySetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsListCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) 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.googleclouddiscoveryenginev1alphapurgeusereventsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSampleQuerySetsListCall) 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}/userEvents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sampleQuerySets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -38590,13 +43045,13 @@ func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.purge" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsSampleQuerySetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38615,7 +43070,7 @@ func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38628,90 +43083,110 @@ func (c *ProjectsLocationsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent - 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 *ProjectsLocationsSampleQuerySetsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSampleQuerySetsResponse) 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) + } } -// Write: Writes a single user event. +type ProjectsLocationsSampleQuerySetsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasamplequeryset *GoogleCloudDiscoveryengineV1alphaSampleQuerySet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a SampleQuerySet. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent +// - name: Immutable. The full resource name of the SampleQuerySet, in the +// format of +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// This field must be a UTF-8 encoded string with a length limit of 1024 +// characters. +func (r *ProjectsLocationsSampleQuerySetsService) Patch(name string, googleclouddiscoveryenginev1alphasamplequeryset *GoogleCloudDiscoveryengineV1alphaSampleQuerySet) *ProjectsLocationsSampleQuerySetsPatchCall { + c := &ProjectsLocationsSampleQuerySetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphasamplequeryset = googleclouddiscoveryenginev1alphasamplequeryset return c } -// WriteAsync sets the optional parameter "writeAsync": If set to true, the -// user event is written asynchronously after validation, and the API responds -// without waiting for the write. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { - c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'sample query set' to update. If not set, will by +// default update all fields. +func (c *ProjectsLocationsSampleQuerySetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSampleQuerySetsPatchCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) 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.googleclouddiscoveryenginev1alphauserevent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasamplequeryset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 "discoveryengine.projects.locations.dataStores.userEvents.write" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaSampleQuerySet.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38730,7 +43205,7 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38743,7 +43218,7 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEvaluationsOperationsGetCall struct { +type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38757,8 +43232,8 @@ type ProjectsLocationsEvaluationsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { - c := &ProjectsLocationsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsSampleQuerySetsOperationsService) Get(name string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c := &ProjectsLocationsSampleQuerySetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38766,7 +43241,7 @@ func (r *ProjectsLocationsEvaluationsOperationsService) 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 *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38774,27 +43249,27 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38815,13 +43290,13 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.evaluations.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38853,59 +43328,73 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsGroundingConfigsCheckCall struct { - s *Service - groundingConfig string - googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasamplequery *GoogleCloudDiscoveryengineV1alphaSampleQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Check: Performs a grounding check. +// Create: Creates a SampleQuery // -// - groundingConfig: The resource name of the grounding config, such as -// `projects/*/locations/global/groundingConfigs/default_grounding_config`. -func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { - c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.groundingConfig = groundingConfig - c.googleclouddiscoveryenginev1alphacheckgroundingrequest = googleclouddiscoveryenginev1alphacheckgroundingrequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Create(parent string, googleclouddiscoveryenginev1alphasamplequery *GoogleCloudDiscoveryengineV1alphaSampleQuery) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphasamplequery = googleclouddiscoveryenginev1alphasamplequery + return c +} + +// SampleQueryId sets the optional parameter "sampleQueryId": Required. The ID +// to use for the SampleQuery, which will become the final component of the +// SampleQuery.name. If the caller does not have permission to create the +// SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` +// error is returned. This field must be unique among all SampleQuerys with the +// same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field +// must conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with +// a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) SampleQueryId(sampleQueryId string) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { + c.urlParams_.Set("sampleQueryId", sampleQueryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) 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.googleclouddiscoveryenginev1alphacheckgroundingrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasamplequery) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+groundingConfig}:check") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sampleQueries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38913,18 +43402,18 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "groundingConfig": c.groundingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse.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 +// *GoogleCloudDiscoveryengineV1alphaSampleQuery.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38943,7 +43432,7 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38956,22 +43445,24 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// Delete: Deletes a SampleQuery. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of SampleQuery, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. If the caller does not have permission to +// delete the SampleQuery, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. If the SampleQuery to delete does +// not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Delete(name string) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38979,45 +43470,34 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // 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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { 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 { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { c.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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) 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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) 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 } @@ -39028,13 +43508,13 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39053,7 +43533,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39066,7 +43546,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsSampleQuerySetsSampleQueriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -39075,40 +43555,24 @@ type ProjectsLocationsOperationsListCall struct { 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`. +// Get: Gets a SampleQuery. // -// - 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)} +// - name: Full resource name of SampleQuery, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. If the caller does not have permission to +// access the SampleQuery, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the requested SampleQuery does not +// exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Get(name string) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesGetCall{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 { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39116,27 +43580,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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { 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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { c.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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) 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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39144,7 +43608,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/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -39157,13 +43621,13 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.operations.list" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1alphaSampleQuery.ServerResponse.Header or (if a // response was returned 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) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39182,7 +43646,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39195,81 +43659,64 @@ func (c *ProjectsLocationsOperationsListCall) 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 *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) - } -} - -type ProjectsLocationsRankingConfigsRankCall struct { - s *Service - rankingConfig string - googleclouddiscoveryenginev1alpharankrequest *GoogleCloudDiscoveryengineV1alphaRankRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportsamplequeriesrequest *GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Rank: Ranks a list of text records based on the given input query. +// Import: Bulk import of multiple SampleQuerys. Sample queries that already +// exist may be deleted. Note: It is possible for a subset of the SampleQuerys +// to be successfully imported. // -// - rankingConfig: The resource name of the rank service config, such as -// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank -// ing_config`. -func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1alpharankrequest *GoogleCloudDiscoveryengineV1alphaRankRequest) *ProjectsLocationsRankingConfigsRankCall { - c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.rankingConfig = rankingConfig - c.googleclouddiscoveryenginev1alpharankrequest = googleclouddiscoveryenginev1alpharankrequest +// - parent: The parent sample query set resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to list SampleQuerys under this +// sample query set, regardless of whether or not this sample query set +// exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsamplequeriesrequest *GoogleCloudDiscoveryengineV1alphaImportSampleQueriesRequest) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportsamplequeriesrequest = googleclouddiscoveryenginev1alphaimportsamplequeriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRankingConfigsRankCall) Fields(s ...googleapi.Field) *ProjectsLocationsRankingConfigsRankCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRankingConfigsRankCall) Context(ctx context.Context) *ProjectsLocationsRankingConfigsRankCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRankingConfigsRankCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRankingConfigsRankCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) 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.googleclouddiscoveryenginev1alpharankrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsamplequeriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+rankingConfig}:rank") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sampleQueries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39277,18 +43724,18 @@ func (c *ProjectsLocationsRankingConfigsRankCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "rankingConfig": c.rankingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.rankingConfigs.rank" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaRankResponse.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 *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRankResponse, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39307,7 +43754,7 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRankResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39320,78 +43767,107 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsRequirementsCheckRequirementCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CheckRequirement: Check a particular requirement. +// List: Gets a list of SampleQuerys. // -// - location: Full resource name of the location. Format -// `projects/{project_number_or_id}/locations/{location}`. -func (r *ProjectsLocationsRequirementsService) CheckRequirement(location string, googleclouddiscoveryenginev1alphacheckrequirementrequest *GoogleCloudDiscoveryengineV1alphaCheckRequirementRequest) *ProjectsLocationsRequirementsCheckRequirementCall { - c := &ProjectsLocationsRequirementsCheckRequirementCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphacheckrequirementrequest = googleclouddiscoveryenginev1alphacheckrequirementrequest +// - parent: The parent sample query set resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to list SampleQuerys under this +// sample query set, regardless of whether or not this sample query set +// exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) List(parent string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SampleQuerys to return. If unspecified, defaults to 100. The maximum allowed +// value is 1000. Values above 1000 will be coerced to 1000. If this field is +// negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListSampleQueriesResponse.next_page_token, received from a previous +// SampleQueryService.ListSampleQueries call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SampleQueryService.ListSampleQueries must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) PageToken(pageToken string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + 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 *ProjectsLocationsRequirementsCheckRequirementCall) Fields(s ...googleapi.Field) *ProjectsLocationsRequirementsCheckRequirementCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { 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 *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRequirementsCheckRequirementCall) Context(ctx context.Context) *ProjectsLocationsRequirementsCheckRequirementCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRequirementsCheckRequirementCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRequirementsCheckRequirementCall) 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.googleclouddiscoveryenginev1alphacheckrequirementrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) 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/{+location}/requirements:checkRequirement") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sampleQueries") 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{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.requirements.checkRequirement" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse.ServerResponse.He +// ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsRequirementsCheckRequirementCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39410,7 +43886,7 @@ func (c *ProjectsLocationsRequirementsCheckRequirementCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCheckRequirementResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39423,68 +43899,93 @@ func (c *ProjectsLocationsRequirementsCheckRequirementCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSampleQueriesResponse) 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) + } } -// 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. +type ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasamplequery *GoogleCloudDiscoveryengineV1alphaSampleQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a SampleQuery. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsSampleQuerySetsOperationsService) Get(name string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { - c := &ProjectsLocationsSampleQuerySetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the sample query, in the format +// of +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string +// with a length limit of 1024 characters. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Patch(name string, googleclouddiscoveryenginev1alphasamplequery *GoogleCloudDiscoveryengineV1alphaSampleQuery) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphasamplequery = googleclouddiscoveryenginev1alphasamplequery + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'simple query' to update. If not set, will by +// default update all fields. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + 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 *ProjectsLocationsSampleQuerySetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { 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 *ProjectsLocationsSampleQuerySetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) 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 *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) 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.googleclouddiscoveryenginev1alphasamplequery) + 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 } @@ -39495,13 +43996,13 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.sampleQuerySets.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.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 +// *GoogleCloudDiscoveryengineV1alphaSampleQuery.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39520,7 +44021,7 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index e7125e4cf37..e3e85178266 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -5823,6 +5823,133 @@ } }, "evaluations": { + "methods": { + "create": { + "description": "Creates a Evaluation. Upon creation, the evaluation will be automatically triggered and begin execution.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.evaluations.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/evaluations", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluation" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Evaluation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of Evaluation, such as `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the caller does not have permission to access the Evaluation, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Evaluation does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of Evaluations.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/evaluations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of Evaluations to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListEvaluationsResponse.next_page_token, received from a previous EvaluationService.ListEvaluations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluations must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list Evaluations under this location, regardless of whether or not this location exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/evaluations", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListEvaluationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "listResults": { + "description": "Gets a list of results for a given a Evaluation.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}:listResults", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.listResults", + "parameterOrder": [ + "evaluation" + ], + "parameters": { + "evaluation": { + "description": "Required. The evaluation resource name, such as `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the caller does not have permission to list EvaluationResult under this evaluation, regardless of whether or not this evaluation set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum number of EvaluationResult to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListEvaluationResultsResponse.next_page_token, received from a previous EvaluationService.ListEvaluationResults call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to EvaluationService.ListEvaluationResults must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+evaluation}:listResults", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "operations": { "methods": { @@ -5990,136 +6117,476 @@ } }, "sampleQuerySets": { - "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": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.sampleQuerySets.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, - "userEvents": { "methods": { - "collect": { - "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:collect", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.userEvents.collect", + "create": { + "description": "Creates a SampleQuerySet", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.create", "parameterOrder": [ "parent" ], "parameters": { - "ets": { - "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - "format": "int64", - "location": "query", - "type": "string" - }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "uri": { - "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "sampleQuerySetId": { + "description": "Required. The ID to use for the SampleQuerySet, which will become the final component of the SampleQuerySet.name. If the caller does not have permission to create the SampleQuerySet, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all SampleQuerySets with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "location": "query", "type": "string" - }, - "userEvent": { - "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - "location": "query", + } + }, + "path": "v1beta/{+parent}/sampleQuerySets", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a SampleQuerySet.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.sampleQuerySets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuerySet, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to delete the SampleQuerySet, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the SampleQuerySet to delete does not exist, a `NOT_FOUND` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, "type": "string" } }, - "path": "v1beta/{+parent}/userEvents:collect", + "path": "v1beta/{+name}", "response": { - "$ref": "GoogleApiHttpBody" + "$ref": "GoogleProtobufEmpty" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "write": { - "description": "Writes a single user event.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:write", - "httpMethod": "POST", - "id": "discoveryengine.projects.locations.userEvents.write", + "get": { + "description": "Gets a SampleQuerySet.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuerySet, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to access the SampleQuerySet, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested SampleQuerySet does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of SampleQuerySets.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.list", "parameterOrder": [ "parent" ], "parameters": { + "pageSize": { + "description": "Maximum number of SampleQuerySets to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListSampleQuerySetsResponse.next_page_token, received from a previous SampleQuerySetService.ListSampleQuerySets call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SampleQuerySetService.ListSampleQuerySets must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", + "description": "Required. The parent location resource name, such as `projects/{project}/locations/{location}`. If the caller does not have permission to list SampleQuerySets under this location, regardless of whether or not this location exists, a `PERMISSION_DENIED` error is returned.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + } + }, + "path": "v1beta/{+parent}/sampleQuerySets", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a SampleQuerySet.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.sampleQuerySets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the SampleQuerySet, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" }, - "writeAsync": { - "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "updateMask": { + "description": "Indicates which fields in the provided imported 'sample query set' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", "location": "query", - "type": "boolean" + "type": "string" } }, - "path": "v1beta/{+parent}/userEvents:write", + "path": "v1beta/{+name}", "request": { - "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" }, "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] } - } - } - } - }, - "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": "v1beta/projects/{projectsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } + }, + "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": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "sampleQueries": { + "methods": { + "create": { + "description": "Creates a SampleQuery", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + }, + "sampleQueryId": { + "description": "Required. The ID to use for the SampleQuery, which will become the final component of the SampleQuery.name. If the caller does not have permission to create the SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all SampleQuerys with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/sampleQueries", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a SampleQuery.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuery, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. If the caller does not have permission to delete the SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the SampleQuery to delete does not exist, a `NOT_FOUND` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a SampleQuery.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of SampleQuery, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. If the caller does not have permission to access the SampleQuery, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested SampleQuery does not exist, a NOT_FOUND error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "import": { + "description": "Bulk import of multiple SampleQuerys. Sample queries that already exist may be deleted. Note: It is possible for a subset of the SampleQuerys to be successfully imported.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries:import", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.import", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list SampleQuerys under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sampleQueries:import", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Gets a list of SampleQuerys.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of SampleQuerys to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token ListSampleQueriesResponse.next_page_token, received from a previous SampleQueryService.ListSampleQueries call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SampleQueryService.ListSampleQueries must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent sample query set resource name, such as `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. If the caller does not have permission to list SampleQuerys under this sample query set, regardless of whether or not this sample query set exists, a `PERMISSION_DENIED` error is returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sampleQueries", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a SampleQuery.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/sampleQuerySets/{sampleQuerySetsId}/sampleQueries/{sampleQueriesId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The full resource name of the sample query, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/sampleQuerySets/[^/]+/sampleQueries/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided imported 'simple query' to update. If not set, will by default update all fields.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "userEvents": { + "methods": { + "collect": { + "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:collect", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.userEvents.collect", + "parameterOrder": [ + "parent" + ], + "parameters": { + "ets": { + "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + "format": "int64", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "uri": { + "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + "location": "query", + "type": "string" + }, + "userEvent": { + "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/userEvents:collect", + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "write": { + "description": "Writes a single user event.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/userEvents:write", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.userEvents.write", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" + } + }, + "path": "v1beta/{+parent}/userEvents:write", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "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": "v1beta/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } }, "path": "v1beta/{+name}", "response": { @@ -6172,283 +6639,815 @@ } } } - } - } - }, - "revision": "20240704", - "rootUrl": "https://discoveryengine.googleapis.com/", - "schemas": { - "GoogleApiHttpBody": { - "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", - "id": "GoogleApiHttpBody", + } + } + }, + "revision": "20240715", + "rootUrl": "https://discoveryengine.googleapis.com/", + "schemas": { + "GoogleApiHttpBody": { + "description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", + "id": "GoogleApiHttpBody", + "properties": { + "contentType": { + "description": "The HTTP Content-Type header value specifying the content type of the body.", + "type": "string" + }, + "data": { + "description": "The HTTP request/response body as raw binary.", + "format": "byte", + "type": "string" + }, + "extensions": { + "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingErrorContext": { + "description": "A description of the context in which an error occurred.", + "id": "GoogleCloudDiscoveryengineLoggingErrorContext", + "properties": { + "httpRequest": { + "$ref": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "description": "The HTTP request which was processed when the error was triggered." + }, + "reportLocation": { + "$ref": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingErrorLog": { + "description": "An error log which is reported to the Error Reporting system.", + "id": "GoogleCloudDiscoveryengineLoggingErrorLog", + "properties": { + "context": { + "$ref": "GoogleCloudDiscoveryengineLoggingErrorContext", + "description": "A description of the context in which the error occurred." + }, + "importPayload": { + "$ref": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "description": "The error payload that is populated on LRO import APIs." + }, + "message": { + "description": "A message describing the error.", + "type": "string" + }, + "requestPayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest`", + "type": "object" + }, + "responsePayload": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent`", + "type": "object" + }, + "serviceContext": { + "$ref": "GoogleCloudDiscoveryengineLoggingServiceContext", + "description": "The service context in which this error has occurred." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The RPC status associated with the error log." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingHttpRequestContext": { + "description": "HTTP request data that is related to a reported error.", + "id": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "properties": { + "responseStatusCode": { + "description": "The HTTP response status code for the request.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingImportErrorContext": { + "description": "The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents`", + "id": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "properties": { + "document": { + "description": "The detailed content which caused the error on importing a document.", + "type": "string" + }, + "gcsPath": { + "description": "Google Cloud Storage file path of the import source. Can be set for batch operation error.", + "type": "string" + }, + "lineNumber": { + "description": "Line number of the content in file. Should be empty for permission or batch operation error.", + "type": "string" + }, + "operation": { + "description": "The operation resource name of the LRO.", + "type": "string" + }, + "userEvent": { + "description": "The detailed content which caused the error on importing a user event.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingServiceContext": { + "description": "Describes a running service that sends errors.", + "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "properties": { + "service": { + "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingSourceLocation": { + "description": "Indicates a location in the source code of the service for which errors are reported.", + "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "properties": { + "functionName": { + "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", + "properties": { + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Condition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1Condition", "properties": { - "contentType": { - "description": "The HTTP Content-Type header value specifying the content type of the body.", + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", "type": "string" }, - "data": { - "description": "The HTTP request/response body as raw binary.", - "format": "byte", + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Control": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "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.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Condition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1CreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateEngineMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1CreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1CreateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "extensions": { - "description": "Application specific response metadata. Must be set in the first response for streaming APIs.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingErrorContext": { - "description": "A description of the context in which an error occurred.", - "id": "GoogleCloudDiscoveryengineLoggingErrorContext", + "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", "properties": { - "httpRequest": { - "$ref": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", - "description": "The HTTP request which was processed when the error was triggered." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "reportLocation": { - "$ref": "GoogleCloudDiscoveryengineLoggingSourceLocation", - "description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingErrorLog": { - "description": "An error log which is reported to the Error Reporting system.", - "id": "GoogleCloudDiscoveryengineLoggingErrorLog", + "GoogleCloudDiscoveryengineV1DataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1DataStore", "properties": { - "context": { - "$ref": "GoogleCloudDiscoveryengineLoggingErrorContext", - "description": "A description of the context in which the error occurred." + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], + "type": "string" }, - "importPayload": { - "$ref": "GoogleCloudDiscoveryengineLoggingImportErrorContext", - "description": "The error payload that is populated on LRO import APIs." + "createTime": { + "description": "Output only. Timestamp the DataStore was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "message": { - "description": "A message describing the error.", + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, "type": "string" }, - "requestPayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The API request payload, represented as a protocol buffer. Most API request types are supported—for example: * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocumentRequest` * `type.googleapis.com/google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEventRequest`", - "type": "object" + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" }, - "responsePayload": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" }, - "description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported, and no PII is included: * `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend` * `google.cloud.discoveryengine.v1alpha.UserEventService.WriteUserEvent` * `google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent`", - "type": "object" + "type": "array" }, - "serviceContext": { - "$ref": "GoogleCloudDiscoveryengineLoggingServiceContext", - "description": "The service context in which this error has occurred." + "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)." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The RPC status associated with the error log." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingHttpRequestContext": { - "description": "HTTP request data that is related to a reported error.", - "id": "GoogleCloudDiscoveryengineLoggingHttpRequestContext", + "GoogleCloudDiscoveryengineV1DeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteEngineMetadata", "properties": { - "responseStatusCode": { - "description": "The HTTP response status code for the request.", - "format": "int32", - "type": "integer" + "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" }, - "GoogleCloudDiscoveryengineLoggingImportErrorContext": { - "description": "The error payload that is populated on LRO import APIs, including the following: * `google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments` * `google.cloud.discoveryengine.v1alpha.UserEventService.ImportUserEvents`", - "id": "GoogleCloudDiscoveryengineLoggingImportErrorContext", + "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata", "properties": { - "document": { - "description": "The detailed content which caused the error on importing a document.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "gcsPath": { - "description": "Google Cloud Storage file path of the import source. Can be set for batch operation error.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "lineNumber": { - "description": "Line number of the content in file. Should be empty for permission or batch operation error.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "operation": { - "description": "The operation resource name of the LRO.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "properties": { + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." }, - "userEvent": { - "description": "The detailed content which caused the error on importing a user event.", + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", "type": "string" + }, + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingServiceContext": { - "description": "Describes a running service that sends errors.", - "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", "properties": { - "service": { - "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", - "type": "string" + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingSourceLocation": { - "description": "Indicates a location in the source code of the service for which errors are reported.", - "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", "properties": { - "functionName": { - "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", - "type": "string" + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" + }, + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", - "properties": { - "targetSites": { - "description": "TargetSites created.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSite" - }, - "type": "array" - } - }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1Condition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1Condition", + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + "type": "string" }, "type": "array" }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", - "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", "type": "boolean" - }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", + "createTime": { + "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Control": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "id": "GoogleCloudDiscoveryengineV1Control", + "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Engine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1Engine", "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.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", - "description": "Defines a boost-type control" + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1Condition" + "type": "string" }, "type": "array" }, "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], + "type": "string" }, "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", - "description": "Defines a redirect-type control." + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." }, "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "description": "Required. The solutions of the engine.", "enum": [ "SOLUTION_TYPE_UNSPECIFIED", "SOLUTION_TYPE_RECOMMENDATION", @@ -6465,99 +7464,130 @@ ], "type": "string" }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1EngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", + "properties": { + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", - "items": { - "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" - ], - "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." - ], - "type": "string" - }, - "type": "array" + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "type": "string" }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", "type": "string" }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "GoogleCloudDiscoveryengineV1EngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "searchAddOns": { + "description": "The add-on that this search engine enables.", "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], "type": "string" }, "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6566,15 +7596,48 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateEngineMetadata", + "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6583,26 +7646,38 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1CreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1ImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1ImportDocumentsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1CreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -6617,130 +7692,167 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1DataStore", + "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse", "properties": { - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", - "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" - ], - "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." - ], + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", "type": "string" }, + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata", + "properties": { "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", + "description": "Operation create time.", "format": "google-datetime", - "readOnly": true, "type": "string" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", - "readOnly": true, - "type": "string" - }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", "type": "string" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." - }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", - "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1ImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "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)." + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1Project": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1Project", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. The timestamp when this project is created.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", "format": "google-datetime", + "readOnly": true, "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", "properties": { - "createTime": { - "description": "Operation create time.", + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", "format": "google-datetime", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", "format": "google-datetime", "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1DeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -6755,32 +7867,48 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse": { + "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "purgeSucceeded": { + "description": "Whether the completion suggestions were successfully purged.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6789,216 +7917,184 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." - }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", "type": "string" }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig" + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfig", - "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." - }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1DocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1Schema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1Schema", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", - "items": { - "type": "string" - }, - "type": "array" + "jsonSchema": { + "description": "The JSON representation of the schema.", + "type": "string" }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { + "description": "Verification information for target sites in advanced site search.", + "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "siteVerificationState": { + "description": "Site verification state indicating the ownership and validity.", + "enum": [ + "SITE_VERIFICATION_STATE_UNSPECIFIED", + "VERIFIED", + "UNVERIFIED", + "EXEMPTED" + ], + "enumDescriptions": [ + "Defaults to VERIFIED.", + "Site ownership verified.", + "Site ownership pending verification or verification failed.", + "Site exempt from verification, e.g., a public website that opens to all." + ], "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "verifyTime": { + "description": "Latest site verification time.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1Engine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1Engine", + "GoogleCloudDiscoveryengineV1TargetSite": { + "description": "A target site for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1TargetSite", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + "exactMatch": { + "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", + "type": "boolean" }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "failureReason": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "description": "Output only. Failure reason.", "readOnly": true }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." - }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", + "generatedUriPattern": { + "description": "Output only. This is system-generated based on the provided_uri_pattern.", "readOnly": true, "type": "string" }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", - "items": { - "type": "string" - }, - "type": "array" - }, - "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", - "type": "string" - }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "indexingStatus": { + "description": "Output only. Indexing status.", "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" + "INDEXING_STATUS_UNSPECIFIED", + "PENDING", + "FAILED", + "SUCCEEDED", + "DELETING" ], "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." + "Defaults to SUCCEEDED.", + "The target site is in the update queue and will be picked up by indexing pipeline.", + "The target site fails to be indexed.", + "The target site has been indexed.", + "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." ], + "readOnly": true, "type": "string" }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + "readOnly": true, "type": "string" }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + "providedUriPattern": { + "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", + "type": "string" }, - "solutionType": { - "description": "Required. The solutions of the engine.", + "rootDomainUri": { + "description": "Output only. Root domain of the provided_uri_pattern.", + "readOnly": true, + "type": "string" + }, + "siteVerificationInfo": { + "$ref": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", + "description": "Output only. Site ownership and validity verification status.", + "readOnly": true + }, + "type": { + "description": "The type of the target site, e.g., whether the site is to be included or excluded.", "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" + "TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" ], "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", + "Include the target site.", + "Exclude the target site." ], "type": "string" }, "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "description": "Output only. The target site's last updated time.", "format": "google-datetime", "readOnly": true, "type": "string" @@ -7006,472 +8102,525 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." - }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", - "type": "string" + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", - "type": "string" - }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", + "format": "int64", "type": "string" - }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1EngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "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" }, - "GoogleCloudDiscoveryengineV1EngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", + "GoogleCloudDiscoveryengineV1alphaAclConfig": { + "description": "Access Control Configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Identity provider config." + }, + "name": { + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1EngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1alphaAnswer": { + "description": "Defines an answer.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswer", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", + "answerSkippedReasons": { + "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", "items": { "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" + "ANSWER_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_ANSWER_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION", + "NO_RELEVANT_CONTENT" ], "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." + "Default value. The answer skipped reason is not specified.", + "The adversarial query ignored case.", + "The non-answer seeking query ignored case.", + "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." ], "type": "string" }, "type": "array" }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], + "answerText": { + "description": "The textual answer.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", + }, + "citations": { + "description": "Citations.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" + }, + "type": "array" + }, + "completeTime": { + "description": "Output only. Answer completed timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", + "createTime": { + "description": "Output only. Answer creation timestamp.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "queryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "description": "Query understanding information." + }, + "references": { + "description": "References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" + }, + "type": "array" + }, + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "The state of the answer generation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Answer generation is currently in progress.", + "Answer generation currently failed.", + "Answer generation has succeeded." + ], "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1ImportCompletionSuggestionsResponse", - "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", - "description": "The desired location of errors incurred during the Import." }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "steps": { + "description": "Answer generation steps.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", + "endIndex": { + "description": "End of the attributed segment, exclusive.", "format": "int64", "type": "string" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" + "sources": { + "description": "Citation sources for the attributed segment.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" }, - "totalCount": { - "description": "Total count of entries that were processed.", + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", "format": "int64", "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", + "properties": { + "referenceId": { + "description": "ID of the citation source.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1ImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { + "description": "Query understanding information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", "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 request.", + "queryClassificationInfo": { + "description": "Query classification information.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1ImportErrorConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { + "description": "Query classification information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "positive": { + "description": "Classification output.", + "type": "boolean" + }, + "type": { + "description": "Query classification type.", + "enum": [ + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" + ], + "enumDescriptions": [ + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerReference": { + "description": "Reference.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "description": "Chunk information." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "description": "Unstructured document information." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", + "content": { + "description": "Chunk textual content.", "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "description": "Document metadata." + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1ImportUserEventsMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { + "description": "Document metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "properties": { + "document": { + "description": "Document resource name.", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, + "title": { + "description": "Title.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1ImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1ImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" }, "type": "array" }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", + "document": { + "description": "Document resource name.", "type": "string" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Project": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1Project", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, + "content": { + "description": "Chunk textual content.", "type": "string" }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + "pageIdentifier": { + "description": "Page identifier.", "type": "string" - }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" - }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", + "GoogleCloudDiscoveryengineV1alphaAnswerStep": { + "description": "Step information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", - "type": "string" - }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", - "type": "string" + "actions": { + "description": "Actions.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + }, + "type": "array" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "description": { + "description": "The description of the step.", "type": "string" }, "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "description": "The state of the step.", "enum": [ "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" ], "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." + "Unknown.", + "Step is currently in progress.", + "Step currently failed.", + "Step has succeeded." ], "type": "string" }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "thought": { + "description": "The thought of the step.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { + "description": "Action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "observation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", + "description": "Observation." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "searchAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "description": "Search action." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse": { - "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1PurgeCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { + "description": "Observation.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "searchResults": { + "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" }, "type": "array" - }, - "purgeSucceeded": { - "description": "Whether the completion suggestions were successfully purged.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunkInfo": { + "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" + }, + "type": "array" + }, + "document": { + "description": "Document resource name.", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "snippetInfo": { + "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" + }, + "type": "array" + }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", + "type": "object" + }, + "title": { + "description": "Title.", "type": "string" }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", + "uri": { + "description": "URI for the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", + "content": { + "description": "Chunk textual content.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", + "properties": { + "snippet": { + "description": "Snippet content.", + "type": "string" + }, + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", + "query": { + "description": "The query to search.", "type": "string" - }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7486,181 +8635,234 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "targetSites": { + "description": "TargetSites created.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" }, "type": "array" }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", - "type": "string" + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1Schema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1Schema", + "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", "properties": { - "jsonSchema": { - "description": "The JSON representation of the schema.", - "type": "string" + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", "type": "string" - }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { - "description": "Verification information for target sites in advanced site search.", - "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", + "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", "properties": { - "siteVerificationState": { - "description": "Site verification state indicating the ownership and validity.", - "enum": [ - "SITE_VERIFICATION_STATE_UNSPECIFIED", - "VERIFIED", - "UNVERIFIED", - "EXEMPTED" - ], - "enumDescriptions": [ - "Defaults to VERIFIED.", - "Site ownership verified.", - "Site ownership pending verification or verification failed.", - "Site exempt from verification, e.g., a public website that opens to all." - ], + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", "type": "string" }, - "verifyTime": { - "description": "Latest site verification time.", + "startTime": { + "description": "Start of time range. Range is inclusive.", "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSite": { - "description": "A target site for the SiteSearchEngine.", - "id": "GoogleCloudDiscoveryengineV1TargetSite", + "GoogleCloudDiscoveryengineV1alphaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1alphaControl", "properties": { - "exactMatch": { - "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", - "type": "boolean" + "associatedServingConfigIds": { + "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" + }, + "readOnly": true, + "type": "array" }, - "failureReason": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", - "description": "Output only. Failure reason.", - "readOnly": true + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "description": "Defines a boost-type control" }, - "generatedUriPattern": { - "description": "Output only. This is system-generated based on the provided_uri_pattern.", - "readOnly": true, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" }, - "indexingStatus": { - "description": "Output only. Indexing status.", + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", "enum": [ - "INDEXING_STATUS_UNSPECIFIED", - "PENDING", - "FAILED", - "SUCCEEDED", - "DELETING" + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" ], "enumDescriptions": [ - "Defaults to SUCCEEDED.", - "The target site is in the update queue and will be picked up by indexing pipeline.", - "The target site fails to be indexed.", - "The target site has been indexed.", - "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." ], - "readOnly": true, "type": "string" }, - "name": { - "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", - "readOnly": true, - "type": "string" + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." }, - "providedUriPattern": { - "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", - "type": "string" + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" }, - "rootDomainUri": { - "description": "Output only. Root domain of the provided_uri_pattern.", - "readOnly": true, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "siteVerificationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", - "description": "Output only. Site ownership and validity verification status.", - "readOnly": true - }, - "type": { - "description": "The type of the target site, e.g., whether the site is to be included or excluded.", - "enum": [ - "TYPE_UNSPECIFIED", - "INCLUDE", - "EXCLUDE" - ], - "enumDescriptions": [ - "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", - "Include the target site.", - "Exclude the target site." - ], + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "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" }, - "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7675,9 +8877,15 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -7692,744 +8900,833 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAclConfig": { - "description": "Access Control Configuration.", - "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", "properties": { - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Identity provider config." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswer": { - "description": "Defines an answer.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswer", + "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec": { + "description": "Defines custom fine tuning spec.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", "properties": { - "answerSkippedReasons": { - "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", - "items": { - "enum": [ - "ANSWER_SKIPPED_REASON_UNSPECIFIED", - "ADVERSARIAL_QUERY_IGNORED", - "NON_ANSWER_SEEKING_QUERY_IGNORED", - "OUT_OF_DOMAIN_QUERY_IGNORED", - "POTENTIAL_POLICY_VIOLATION", - "NO_RELEVANT_CONTENT" - ], - "enumDescriptions": [ - "Default value. The answer skipped reason is not specified.", - "The adversarial query ignored case.", - "The non-answer seeking query ignored case.", - "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." - ], - "type": "string" - }, - "type": "array" + "enableSearchAdaptor": { + "description": "Whether or not to enable and include custom fine tuned search adaptor model.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCustomTuningModel": { + "description": "Metadata that describes a custom tuned model.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", + "properties": { + "createTime": { + "deprecated": true, + "description": "Timestamp the Model was created at.", + "format": "google-datetime", + "type": "string" }, - "answerText": { - "description": "The textual answer.", + "displayName": { + "description": "The display name of the model.", "type": "string" }, - "citations": { - "description": "Citations.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" }, - "type": "array" + "description": "The metrics of the trained model.", + "type": "object" }, - "completeTime": { - "description": "Output only. Answer completed timestamp.", + "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" + ], + "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." + ], + "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", - "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "properties": { + "aclEnabled": { + "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "type": "boolean" + }, + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "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." + ], "type": "string" }, "createTime": { - "description": "Output only. Answer creation timestamp.", + "description": "Output only. Timestamp the DataStore was created at.", "format": "google-datetime", "readOnly": true, "type": "string" }, - "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, "type": "string" }, - "queryUnderstandingInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", - "description": "Query understanding information." + "displayName": { + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "type": "string" }, - "references": { - "description": "References.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" - }, - "type": "array" + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." }, - "relatedQuestions": { - "description": "Suggested related questions.", - "items": { - "type": "string" - }, - "type": "array" + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Output only. Data store level identity provider config.", + "readOnly": true }, - "state": { - "description": "The state of the answer generation.", + "industryVertical": { + "description": "Immutable. The industry vertical that the data store registers.", "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS", - "FAILED", - "SUCCEEDED" + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" ], "enumDescriptions": [ - "Unknown.", - "Answer generation is currently in progress.", - "Answer generation currently failed.", - "Answer generation has succeeded." + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." ], "type": "string" }, - "steps": { - "description": "Answer generation steps.", + "languageInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", + "description": "Language info for DataStore." + }, + "name": { + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" }, "type": "array" + }, + "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)." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { - "description": "Citation info for a segment.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", + "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", "properties": { - "endIndex": { - "description": "End of the attributed segment, exclusive.", - "format": "int64", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "sources": { - "description": "Citation sources for the attributed segment.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" - }, - "type": "array" - }, - "startIndex": { - "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", - "format": "int64", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { - "description": "Citation source.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", + "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", "properties": { - "referenceId": { - "description": "ID of the citation source.", + "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" }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { - "description": "Query understanding information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", - "properties": { - "queryClassificationInfo": { - "description": "Query classification information.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { - "description": "Query classification information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", + "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", "properties": { - "positive": { - "description": "Classification output.", - "type": "boolean" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "type": { - "description": "Query classification type.", - "enum": [ - "TYPE_UNSPECIFIED", - "ADVERSARIAL_QUERY", - "NON_ANSWER_SEEKING_QUERY" - ], - "enumDescriptions": [ - "Unspecified query classification type.", - "Adversarial query classification type.", - "Non-answer-seeking query classification type." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReference": { - "description": "Reference.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", + "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", "properties": { - "chunkInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", - "description": "Chunk information." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "unstructuredDocumentInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", - "description": "Unstructured document information." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { - "description": "Chunk information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", "properties": { - "chunk": { - "description": "Chunk resource name.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "content": { - "description": "Chunk textual content.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" - }, - "documentMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", - "description": "Document metadata." - }, - "relevanceScore": { - "description": "Relevance score.", - "format": "float", - "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { - "description": "Document metadata.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", "properties": { - "document": { - "description": "Document resource name.", - "type": "string" + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." }, - "pageIdentifier": { - "description": "Page identifier.", + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + }, + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", "type": "string" }, - "structData": { + "parsingConfigOverrides": { "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" }, - "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", "type": "object" - }, - "title": { - "description": "Title.", - "type": "string" - }, - "uri": { - "description": "URI for the document.", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { - "description": "Unstructured document information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", "properties": { - "chunkContents": { - "description": "List of cited chunk contents derived from document content.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" - }, - "type": "array" - }, - "document": { - "description": "Document resource name.", - "type": "string" - }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", - "type": "object" + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "properties": { + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" }, - "title": { - "description": "Title.", - "type": "string" + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "properties": { + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." }, - "uri": { - "description": "URI for the document.", - "type": "string" + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { - "description": "Chunk content.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", - "properties": { - "content": { - "description": "Chunk textual content.", - "type": "string" - }, - "pageIdentifier": { - "description": "Page identifier.", - "type": "string" - } - }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStep": { - "description": "Step information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", "properties": { - "actions": { - "description": "Actions.", + "enhancedDocumentElements": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + "type": "string" }, "type": "array" }, - "description": { - "description": "The description of the step.", - "type": "string" - }, - "state": { - "description": "The state of the step.", - "enum": [ - "STATE_UNSPECIFIED", - "IN_PROGRESS", - "FAILED", - "SUCCEEDED" - ], - "enumDescriptions": [ - "Unknown.", - "Step is currently in progress.", - "Step currently failed.", - "Step has succeeded." - ], - "type": "string" - }, - "thought": { - "description": "The thought of the step.", - "type": "string" + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { - "description": "Action.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", "properties": { - "observation": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", - "description": "Observation." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "searchAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", - "description": "Search action." + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { - "description": "Observation.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", - "properties": { - "searchResults": { - "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" - }, - "type": "array" - } - }, + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", + "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", + "GoogleCloudDiscoveryengineV1alphaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngine", "properties": { - "chunkInfo": { - "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" - }, - "type": "array" + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." }, - "document": { - "description": "Document resource name.", + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "snippetInfo": { - "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" + "type": "string" }, "type": "array" }, - "structData": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", - "type": "object" - }, - "title": { - "description": "Title.", + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", "type": "string" }, - "uri": { - "description": "URI for the document.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { - "description": "Chunk information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", - "properties": { - "chunk": { - "description": "Chunk resource name.", + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", + "enum": [ + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" + ], + "enumDescriptions": [ + "Value used when unset.", + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." + ], "type": "string" }, - "content": { - "description": "Chunk textual content.", + "mediaRecommendationEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." + }, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, - "relevanceScore": { - "description": "Relevance score.", - "format": "float", - "type": "number" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { - "description": "Snippet information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", - "properties": { - "snippet": { - "description": "Snippet content.", + "recommendationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "readOnly": true + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "similarDocumentsConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "description": "Additional config specs for a `similar-items` engine." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], "type": "string" }, - "snippetStatus": { - "description": "Status of the snippet defined by the search team.", + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { - "description": "Search action.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", "properties": { - "query": { - "description": "The query to search.", + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." + }, + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", "properties": { - "targetSites": { - "description": "TargetSites created.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" - }, - "type": "array" + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCondition": { - "description": "Defines circumstances to be checked before allowing a behavior", - "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "properties": { - "activeTimeRange": { - "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" - }, - "type": "array" - }, - "queryTerms": { - "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" - }, - "type": "array" + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { - "description": "Matcher for search request query", - "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { + "description": "Additional config specs for a Media Recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", "properties": { - "fullMatch": { - "description": "Whether the search query needs to exactly match the query term.", - "type": "boolean" + "optimizationObjective": { + "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", + "type": "string" }, - "value": { - "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "optimizationObjectiveConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + }, + "trainingState": { + "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The engine training is paused.", + "The engine is training." + ], + "type": "string" + }, + "type": { + "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { - "description": "Used for time-dependent conditions.", - "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { + "description": "Custom threshold for `cvr` optimization_objective.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", "properties": { - "endTime": { - "description": "End of time range. Range is inclusive. Must be in the future.", - "format": "google-datetime", + "targetField": { + "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", "type": "string" }, - "startTime": { - "description": "Start of time range. Range is inclusive.", - "format": "google-datetime", - "type": "string" + "targetFieldValueFloat": { + "description": "Required. The threshold to be applied to the target (e.g., 0.5).", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControl": { - "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", - "id": "GoogleCloudDiscoveryengineV1alphaControl", + "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { + "description": "Additional information of a recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", "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.", - "items": { - "type": "string" - }, + "dataState": { + "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The engine has sufficient training data.", + "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." + ], "readOnly": true, - "type": "array" - }, - "boostAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", - "description": "Defines a boost-type control" - }, - "conditions": { - "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" - }, - "type": "array" - }, - "displayName": { - "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" }, - "filterAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", - "description": "Defines a filter-type control Currently not supported by Recommendation" - }, - "name": { - "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "redirectAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", - "description": "Defines a redirect-type control." - }, - "solutionType": { - "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "servingState": { + "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" ], "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + "Unspecified serving state.", + "The engine is not serving.", + "The engine is serving and can be queried.", + "The engine is trained on tuned hyperparameters and can be queried." ], + "readOnly": true, "type": "string" }, - "synonymsAction": { - "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", - "description": "Treats a group of terms as synonyms of one another." - }, - "useCases": { - "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "tuningOperation": { + "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", "items": { "enum": [ - "SEARCH_USE_CASE_UNSPECIFIED", - "SEARCH_USE_CASE_SEARCH", - "SEARCH_USE_CASE_BROWSE" + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" ], "enumDescriptions": [ - "Value used when unset. Will not occur in CSS.", - "Search use case. Expects the traffic has a non-empty query.", - "Browse use case. Expects the traffic has an empty query." + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." ], "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { - "description": "Adjusts order of products in returned list.", - "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", - "properties": { - "boost": { - "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", - "format": "float", - "type": "number" - }, - "dataStore": { - "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" - }, - "filter": { - "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { - "description": "Specified which products may be included in results. Uses same filter as boost.", - "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", - "properties": { - "dataStore": { - "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", - "type": "string" }, - "filter": { - "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { - "description": "Redirects a shopper to the provided URI.", - "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { + "description": "Additional config specs for a `similar-items` engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { + "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", "properties": { - "redirectUri": { - "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { - "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", - "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { + "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", "properties": { - "synonyms": { - "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", - "items": { - "type": "string" - }, - "type": "array" + "dataSizeBytes": { + "description": "Data size in terms of bytes.", + "format": "int64", + "type": "string" + }, + "documentCount": { + "description": "Total number of documents.", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluation", "properties": { "createTime": { - "description": "Operation create time.", + "description": "Output only. Timestamp the Evaluation was created at.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true + }, + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "readOnly": true, + "type": "array" + }, + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." + }, + "name": { + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the evaluation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." + ], + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec", "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", + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata": { + "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -8444,210 +9741,245 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCustomTuningModel": { - "description": "Metadata that describes a custom tuned model.", - "id": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel", + "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse": { + "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse", "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" + "outputResult": { + "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResult", + "description": "Output result indicating where the data were exported to." }, - "metrics": { - "additionalProperties": { - "format": "double", - "type": "number" + "status": { + "$ref": "GoogleRpcStatus", + "description": "The status of the export operation." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaFieldConfig": { + "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", + "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", + "properties": { + "advancedSiteSearchDataSources": { + "description": "If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged. Assuming a page with `` in meta tag, and `` in page map: if this enum is set to METATAGS, we will only index ``; if this enum is not set, we will merge them and index ``.", + "items": { + "enum": [ + "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", + "METATAGS", + "PAGEMAP", + "SCHEMA_ORG" + ], + "enumDescriptions": [ + "Value used when unset.", + "Retrieve value from meta tag.", + "Retrieve value from page map.", + "Retrieve value from schema.org data." + ], + "type": "string" }, - "description": "The metrics of the trained model.", - "type": "object" + "type": "array" }, - "modelState": { - "description": "The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).", + "completableOption": { + "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", "enum": [ - "MODEL_STATE_UNSPECIFIED", - "TRAINING_PAUSED", - "TRAINING", - "TRAINING_COMPLETE", - "READY_FOR_SERVING", - "TRAINING_FAILED", - "NO_IMPROVEMENT" + "COMPLETABLE_OPTION_UNSPECIFIED", + "COMPLETABLE_ENABLED", + "COMPLETABLE_DISABLED" ], "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." + "Value used when unset.", + "Completable option enabled for a schema field.", + "Completable option disabled for a schema field." ], "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" - }, - "GoogleCloudDiscoveryengineV1alphaDataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1alphaDataStore", - "properties": { - "aclEnabled": { - "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", - "type": "boolean" - }, - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "dynamicFacetableOption": { + "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", + "DYNAMIC_FACETABLE_ENABLED", + "DYNAMIC_FACETABLE_DISABLED" ], "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." + "Value used when unset.", + "Dynamic facetable option enabled for a schema field.", + "Dynamic facetable option disabled for a schema field." ], "type": "string" }, - "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", - "format": "google-datetime", - "readOnly": true, + "fieldPath": { + "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", "type": "string" }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", + "fieldType": { + "description": "Output only. Raw type of the field.", + "enum": [ + "FIELD_TYPE_UNSPECIFIED", + "OBJECT", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "GEOLOCATION", + "DATETIME" + ], + "enumDescriptions": [ + "Field type is unspecified.", + "Field value type is Object.", + "Field value type is String.", + "Field value type is Number.", + "Field value type is Integer.", + "Field value type is Boolean.", + "Field value type is Geolocation. Geolocation is expressed as an object with the following keys: * `id`: a string representing the location id * `longitude`: a number representing the longitude coordinate of the location * `latitude`: a number repesenting the latitude coordinate of the location * `address`: a string representing the full address of the location `latitude` and `longitude` must always be provided together. At least one of a) `address` or b) `latitude`-`longitude` pair must be provided.", + "Field value type is Datetime. Datetime can be expressed as either: * a number representing milliseconds-since-the-epoch * a string representing milliseconds-since-the-epoch. e.g. `\"1420070400001\"` * a string representing the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date or date and time. e.g. `\"2015-01-01\"` or `\"2015-01-01T12:10:30Z\"`" + ], "readOnly": true, "type": "string" }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "indexableOption": { + "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "INDEXABLE_OPTION_UNSPECIFIED", + "INDEXABLE_ENABLED", + "INDEXABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Indexable option enabled for a schema field.", + "Indexable option disabled for a schema field." + ], "type": "string" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." - }, - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Output only. Data store level identity provider config.", - "readOnly": true + "keyPropertyType": { + "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", + "readOnly": true, + "type": "string" }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", + "recsFilterableOption": { + "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" + "FILTERABLE_OPTION_UNSPECIFIED", + "FILTERABLE_ENABLED", + "FILTERABLE_DISABLED" ], "enumDescriptions": [ "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." + "Filterable option enabled for a schema field.", + "Filterable option disabled for a schema field." ], "type": "string" }, - "languageInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", - "description": "Language info for DataStore." - }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "retrievableOption": { + "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Retrievable option enabled for a schema field.", + "Retrievable option disabled for a schema field." + ], "type": "string" }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "schemaOrgPaths": { + "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], "type": "string" }, "type": "array" }, - "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)." + "searchableOption": { + "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "SEARCHABLE_OPTION_UNSPECIFIED", + "SEARCHABLE_ENABLED", + "SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Searchable option enabled for a schema field.", + "Searchable option disabled for a schema field." + ], + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "documentDataMap": { + "additionalProperties": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "type": "object" + }, + "description": "Document data keyed by URI pattern. For example: document_data_map = { \"www.url1.com/*\": { \"Categories\": [\"category1\", \"category2\"] }, \"www.url2.com/*\": { \"Categories\": [\"category3\"] } }", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaIdpConfig": { + "description": "Identity Provider Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "properties": { + "externalIdpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "description": "External Identity provider config." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "idpType": { + "description": "Identity provider type configured.", + "enum": [ + "IDP_TYPE_UNSPECIFIED", + "GSUITE", + "THIRD_PARTY" + ], + "enumDescriptions": [ + "Default value. ACL search not enabled.", + "Google 1P provider.", + "Third party provider." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { + "description": "Third party IDP Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", "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", + "workforcePoolName": { + "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -8656,32 +9988,48 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -8690,118 +10038,88 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." - }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", - "type": "string" + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and layout parsing are supported. * `pptx`: Override parsing config for PPTX files, only digital parsing and layout parsing are supported.", - "type": "object" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", - "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" - }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." + "createTime": { + "description": "ImportSampleQueries operation create time.", + "format": "google-datetime", + "type": "string" }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse", "properties": { - "enhancedDocumentElements": { - "deprecated": true, - "description": "[DEPRECATED] This field is deprecated. To use the additional enhanced document elements processing, please switch to `layout_parsing_config`.", + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "type": "string" + "$ref": "GoogleRpcStatus" }, "type": "array" - }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -8816,343 +10134,346 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaEngine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngine", + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." - }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true - }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." - }, - "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", "items": { - "type": "string" + "$ref": "GoogleRpcStatus" }, "type": "array" }, - "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", "type": "string" }, - "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore linked to the engine.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", "type": "string" - }, - "mediaRecommendationEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", - "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." - }, - "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "recommendationMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", - "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", - "readOnly": true - }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." - }, - "similarDocumentsConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", - "description": "Additional config specs for a `similar-items` engine." + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" }, - "solutionType": { - "description": "Required. The solutions of the engine.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", "type": "string" }, "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", - "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1alphaInterval": { + "description": "A floating point interval.", + "id": "GoogleCloudDiscoveryengineV1alphaInterval", + "properties": { + "exclusiveMaximum": { + "description": "Exclusive upper bound.", + "format": "double", + "type": "number" + }, + "exclusiveMinimum": { + "description": "Exclusive lower bound.", + "format": "double", + "type": "number" + }, + "maximum": { + "description": "Inclusive upper bound.", + "format": "double", + "type": "number" + }, + "minimum": { + "description": "Inclusive lower bound.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaLanguageInfo": { + "description": "Language info for DataStore.", + "id": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", + "language": { + "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", + "readOnly": true, "type": "string" }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "languageCode": { + "description": "The language code for the DataStore.", "type": "string" }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "normalizedLanguageCode": { + "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", + "readOnly": true, "type": "string" }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "region": { + "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse": { + "description": "Response message for SearchTuningService.ListCustomModels method.", + "id": "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", - "type": "string" + "models": { + "description": "List of custom tuning models.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "GoogleCloudDiscoveryengineV1alphaOutputResult": { + "description": "Output result that stores the information about where the exported data is stored.", + "id": "GoogleCloudDiscoveryengineV1alphaOutputResult", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", - "type": "string" + "bigqueryResult": { + "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", + "description": "The BigQuery location where the result is stored." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { - "description": "Additional config specs for a Media Recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult": { + "description": "A BigQuery output result.", + "id": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", "properties": { - "optimizationObjective": { - "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", - "type": "string" - }, - "optimizationObjectiveConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", - "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." - }, - "trainingState": { - "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", - "enum": [ - "TRAINING_STATE_UNSPECIFIED", - "PAUSED", - "TRAINING" - ], - "enumDescriptions": [ - "Unspecified training state.", - "The engine training is paused.", - "The engine is training." - ], + "datasetId": { + "description": "The ID of a BigQuery Dataset.", "type": "string" }, - "type": { - "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", + "tableId": { + "description": "The ID of a BigQuery Table.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { - "description": "Custom threshold for `cvr` optimization_objective.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "GoogleCloudDiscoveryengineV1alphaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1alphaProject", "properties": { - "targetField": { - "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "targetFieldValueFloat": { - "description": "Required. The threshold to be applied to the target (e.g., 0.5).", - "format": "float", - "type": "number" + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { - "description": "Additional information of a recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms", "properties": { - "dataState": { - "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", - "enum": [ - "DATA_STATE_UNSPECIFIED", - "DATA_OK", - "DATA_ERROR" - ], - "enumDescriptions": [ - "Unspecified default value, should never be explicitly set.", - "The engine has sufficient training data.", - "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." - ], - "readOnly": true, + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", "type": "string" }, - "lastTuneTime": { - "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", "format": "google-datetime", - "readOnly": true, "type": "string" }, - "servingState": { - "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", "enum": [ - "SERVING_STATE_UNSPECIFIED", - "INACTIVE", - "ACTIVE", - "TUNED" + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" ], "enumDescriptions": [ - "Unspecified serving state.", - "The engine is not serving.", - "The engine is serving and can be queried.", - "The engine is trained on tuned hyperparameters and can be queried." + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." ], - "readOnly": true, "type": "string" }, - "tuningOperation": { - "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", - "readOnly": true, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", - "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" - }, - "type": "array" + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { - "description": "Additional config specs for a `similar-items` engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", - "properties": {}, + "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse": { + "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "purgeSucceeded": { + "description": "Whether the completion suggestions were successfully purged.", + "type": "boolean" + } + }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { - "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "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" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { - "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", "properties": { - "dataSizeBytes": { - "description": "Data size in terms of bytes.", + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", "format": "int64", "type": "string" }, - "documentCount": { - "description": "Total number of documents.", - "format": "int64", - "type": "string" + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata": { - "description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -9167,866 +10488,930 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse": { - "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaExportUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", "properties": { - "outputResult": { - "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResult", - "description": "Output result indicating where the data were exported to." + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" }, - "status": { - "$ref": "GoogleRpcStatus", - "description": "The status of the export operation." + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFieldConfig": { - "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", - "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { + "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", "properties": { - "advancedSiteSearchDataSources": { - "description": "If this field is set, only the corresponding source will be indexed for this field. Otherwise, the values from different sources are merged. Assuming a page with `` in meta tag, and `` in page map: if this enum is set to METATAGS, we will only index ``; if this enum is not set, we will merge them and index ``.", - "items": { - "enum": [ - "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", - "METATAGS", - "PAGEMAP", - "SCHEMA_ORG" - ], - "enumDescriptions": [ - "Value used when unset.", - "Retrieve value from meta tag.", - "Retrieve value from page map.", - "Retrieve value from schema.org data." - ], - "type": "string" - }, - "type": "array" - }, - "completableOption": { - "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "COMPLETABLE_OPTION_UNSPECIFIED", - "COMPLETABLE_ENABLED", - "COMPLETABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Completable option enabled for a schema field.", - "Completable option disabled for a schema field." - ], - "type": "string" - }, - "dynamicFacetableOption": { - "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", - "DYNAMIC_FACETABLE_ENABLED", - "DYNAMIC_FACETABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Dynamic facetable option enabled for a schema field.", - "Dynamic facetable option disabled for a schema field." - ], - "type": "string" - }, - "fieldPath": { - "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", - "type": "string" - }, - "fieldType": { - "description": "Output only. Raw type of the field.", - "enum": [ - "FIELD_TYPE_UNSPECIFIED", - "OBJECT", - "STRING", - "NUMBER", - "INTEGER", - "BOOLEAN", - "GEOLOCATION", - "DATETIME" - ], - "enumDescriptions": [ - "Field type is unspecified.", - "Field value type is Object.", - "Field value type is String.", - "Field value type is Number.", - "Field value type is Integer.", - "Field value type is Boolean.", - "Field value type is Geolocation. Geolocation is expressed as an object with the following keys: * `id`: a string representing the location id * `longitude`: a number representing the longitude coordinate of the location * `latitude`: a number repesenting the latitude coordinate of the location * `address`: a string representing the full address of the location `latitude` and `longitude` must always be provided together. At least one of a) `address` or b) `latitude`-`longitude` pair must be provided.", - "Field value type is Datetime. Datetime can be expressed as either: * a number representing milliseconds-since-the-epoch * a string representing milliseconds-since-the-epoch. e.g. `\"1420070400001\"` * a string representing the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date or date and time. e.g. `\"2015-01-01\"` or `\"2015-01-01T12:10:30Z\"`" - ], - "readOnly": true, - "type": "string" - }, - "indexableOption": { - "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "INDEXABLE_OPTION_UNSPECIFIED", - "INDEXABLE_ENABLED", - "INDEXABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Indexable option enabled for a schema field.", - "Indexable option disabled for a schema field." - ], - "type": "string" - }, - "keyPropertyType": { - "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", - "readOnly": true, + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "recsFilterableOption": { - "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", - "enum": [ - "FILTERABLE_OPTION_UNSPECIFIED", - "FILTERABLE_ENABLED", - "FILTERABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Filterable option enabled for a schema field.", - "Filterable option disabled for a schema field." - ], + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", "type": "string" }, - "retrievableOption": { - "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "RETRIEVABLE_OPTION_UNSPECIFIED", - "RETRIEVABLE_ENABLED", - "RETRIEVABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Retrievable option enabled for a schema field.", - "Retrievable option disabled for a schema field." - ], + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", "type": "string" }, - "schemaOrgPaths": { - "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", - "items": { - "type": "string" - }, - "type": "array" - }, - "searchableOption": { - "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "SEARCHABLE_OPTION_UNSPECIFIED", - "SEARCHABLE_ENABLED", - "SEARCHABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Searchable option enabled for a schema field.", - "Searchable option disabled for a schema field." - ], + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaIdpConfig": { - "description": "Identity Provider Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { + "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", "properties": { - "externalIdpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", - "description": "External Identity provider config." - }, - "idpType": { - "description": "Identity provider type configured.", - "enum": [ - "IDP_TYPE_UNSPECIFIED", - "GSUITE", - "THIRD_PARTY" - ], - "enumDescriptions": [ - "Default value. ACL search not enabled.", - "Google 1P provider.", - "Third party provider." - ], + "purgeCount": { + "description": "The total count of events purged as a result of the operation.", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { - "description": "Third party IDP Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "GoogleCloudDiscoveryengineV1alphaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetrics", "properties": { - "workforcePoolName": { - "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", - "type": "string" + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", - "type": "string" + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", - "format": "int64", - "type": "string" + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaQuery": { + "description": "Defines a user inputed query.", + "id": "GoogleCloudDiscoveryengineV1alphaQuery", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "The desired location of errors incurred during the Import." + "queryId": { + "description": "Unique Id for the query.", + "type": "string" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "text": { + "description": "Plain text.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "invalidUris": { + "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", + "items": { + "type": "string" + }, + "type": "array" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" + "pendingCount": { + "description": "Total number of URIs that have yet to be crawled.", + "format": "int32", + "type": "integer" }, - "totalCount": { - "description": "Total count of entries that were processed.", - "format": "int64", - "type": "string" + "quotaExceededCount": { + "description": "Total number of URIs that were rejected due to insufficient indexing resources.", + "format": "int32", + "type": "integer" + }, + "successCount": { + "description": "Total number of URIs that have been crawled so far.", + "format": "int32", + "type": "integer" }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", "type": "string" + }, + "validUrisCount": { + "description": "Total number of unique URIs in the request that are not in invalid_uris.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { + "description": "Response message for SiteSearchEngineService.RecrawlUris method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." + "failedUris": { + "description": "URIs that were not crawled before the LRO terminated.", + "items": { + "type": "string" + }, + "type": "array" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "failureSamples": { + "description": "Details for a sample of up to 10 `failed_uris`.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { + "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "failureReasons": { + "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" + }, + "type": "array" + }, + "uri": { + "description": "URI that failed to be crawled.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { + "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "corpusType": { + "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", + "enum": [ + "CORPUS_TYPE_UNSPECIFIED", + "DESKTOP", + "MOBILE" + ], + "enumDescriptions": [ + "Default value.", + "Denotes a crawling attempt for the desktop version of a page.", + "Denotes a crawling attempt for the mobile version of a page." + ], "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "errorMessage": { + "description": "Reason why the URI was not crawled.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaSchema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1alphaSchema", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "fieldConfigs": { + "description": "Output only. Configurations for fields of the schema.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" }, + "readOnly": true, "type": "array" }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", + "jsonSchema": { + "description": "The JSON representation of the schema.", "type": "string" }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequest": { + "description": "Request message for SearchService.Search method.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequest", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, + "branch": { + "description": "The branch resource name, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/branches/0`. Use `default_branch` as the branch ID or leave this field empty, to search documents under the default branch.", + "type": "string" + }, + "canonicalFilter": { + "description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", + "type": "string" + }, + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "A specification for configuring the behavior of content search." + }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs. If set, it has higher priority than the configs set in ServingConfig.custom_fine_tuning_spec." + }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + }, + "type": "array" + }, + "embeddingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", + "description": "Uses the provided embedding to do additional semantic document retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embedding that is provided in SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it will use ServingConfig.EmbeddingConfig.field_path." + }, + "facetSpecs": { + "description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec" + }, + "type": "array" + }, + "filter": { + "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customer might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", + "type": "string" + }, + "imageQuery": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", + "description": "Raw image query." + }, + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Standard fields](https://cloud.google.com/apis/design/standard_fields). This field helps to better interpret the query. If a value isn't specified, the query language code is automatically detected, which may not be accurate.", + "type": "string" + }, + "naturalLanguageQueryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "description": "If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional natural language query understanding will be done." + }, + "offset": { + "description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Documents deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering for retail search, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + }, + "params": { + "additionalProperties": { + "type": "any" + }, + "description": "Additional search parameters. For public website search only, supported values are: * `user_country_code`: string. Default empty. If set to non-empty, results are restricted or boosted based on the location provided. For example, `user_country_code: \"au\"` For available codes see [Country Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) * `search_type`: double. Default empty. Enables non-webpage searching depending on the value. The only valid non-default value is 1, which enables image searching. For example, `search_type: 1`", + "type": "object" + }, + "query": { + "description": "Raw search query.", + "type": "string" + }, + "queryExpansionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", + "description": "The query expansion specification that specifies the conditions under which query expansion occurs." + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. This overrides ServingConfig.ranking_expression. The ranking expression is a single function or multiple functions that are joined by \"+\". * ranking_expression = function, { \" + \", function }; Supported functions: * double * relevance_score * double * dotProduct(embedding_field_path) Function variables: * `relevance_score`: pre-defined keywords, used for measure relevance between query and document. * `embedding_field_path`: the document embedding field used with query embedding vector. * `dotProduct`: embedding function between embedding_field_path and query embedding vector. Example ranking expression: If document has an embedding field doc_embedding, the ranking expression could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "regionCode": { + "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" }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", + "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" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", - "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." + "safeSearch": { + "description": "Whether to turn on safe search. This is only supported for website search.", + "type": "boolean" }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "searchAsYouTypeSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", + "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", "type": "string" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaLanguageInfo": { - "description": "Language info for DataStore.", - "id": "GoogleCloudDiscoveryengineV1alphaLanguageInfo", - "properties": { - "language": { - "description": "Output only. Language part of normalized_language_code. E.g.: `en-US` -\u003e `en`, `zh-Hans-HK` -\u003e `zh`, `en` -\u003e `en`.", - "readOnly": true, + "session": { + "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", "type": "string" }, - "languageCode": { - "description": "The language code for the DataStore.", - "type": "string" + "sessionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", + "description": "Session specification. Can be used only when `session` is set." }, - "normalizedLanguageCode": { - "description": "Output only. This is the normalized form of language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` will have normalized_language_code of `en-GB`.", - "readOnly": true, - "type": "string" + "spellCorrectionSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", + "description": "The spell correction specification that specifies the mode under which spell correction takes effect." }, - "region": { - "description": "Output only. Region part of normalized_language_code, if present. E.g.: `en-US` -\u003e `US`, `zh-Hans-HK` -\u003e `HK`, `en` -\u003e ``.", - "readOnly": true, + "userInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "description": "Information about the end user. Highly recommended for analytics. UserInfo.user_agent is used to deduce `device_type` for analytics." + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse": { - "description": "Response message for SearchTuningService.ListCustomModels method.", - "id": "GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec": { + "description": "Boost specification to boost certain documents.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", "properties": { - "models": { - "description": "List of custom tuning models.", + "conditionBoostSpecs": { + "description": "Condition boost specifications. If a document matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaCustomTuningModel" + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaOutputResult": { - "description": "Output result that stores the information about where the exported data is stored.", - "id": "GoogleCloudDiscoveryengineV1alphaOutputResult", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec": { + "description": "Boost applies to documents which match a condition.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec", "properties": { - "bigqueryResult": { - "$ref": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", - "description": "The BigQuery location where the result is stored." + "boost": { + "description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored. Only one of the (condition, boost) combination or the boost_control_spec below are set. If both are set then the global boost is ignored and the more fine-grained boost_control_spec is applied.", + "format": "float", + "type": "number" + }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, + "condition": { + "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult": { - "description": "A BigQuery output result.", - "id": "GoogleCloudDiscoveryengineV1alphaOutputResultBigQueryOutputResult", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", "properties": { - "datasetId": { - "description": "The ID of a BigQuery Dataset.", + "attributeType": { + "description": "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]`. For example, `5D`, `3DT12H30M`, `T24H`." + ], "type": "string" }, - "tableId": { - "description": "The ID of a BigQuery Table.", + "controlPoints": { + "description": "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1alphaProject": { - "description": "Metadata and configurations for a Google Cloud project in the service.", - "id": "GoogleCloudDiscoveryengineV1alphaProject", + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "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": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", "properties": { - "createTime": { - "description": "Output only. The timestamp when this project is created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "name": { - "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", - "readOnly": true, - "type": "string" - }, - "provisionCompletionTime": { - "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", - "format": "google-datetime", - "readOnly": true, + "attributeValue": { + "description": "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" }, - "serviceTermsMap": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms" - }, - "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", - "readOnly": true, - "type": "object" + "boostAmount": { + "description": "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" }, - "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms": { - "description": "Metadata about the terms of service.", - "id": "GoogleCloudDiscoveryengineV1alphaProjectServiceTerms", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", "properties": { - "acceptTime": { - "description": "The last time when the project agreed to the terms of service.", - "format": "google-datetime", - "type": "string" - }, - "declineTime": { - "description": "The last time when the project declined or revoked the agreement to terms of service.", - "format": "google-datetime", - "type": "string" + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" }, - "id": { - "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", - "type": "string" + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, - "state": { - "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", "enum": [ - "STATE_UNSPECIFIED", - "TERMS_ACCEPTED", - "TERMS_PENDING", - "TERMS_DECLINED" + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" ], "enumDescriptions": [ - "The default value of the enum. This value is not actually used.", - "The project has given consent to the terms of service.", - "The project is pending to review and accept the terms of service.", - "The project has declined or revoked the agreement to terms of service." + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." ], "type": "string" }, - "version": { - "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", - "type": "string" + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata": { - "description": "Metadata associated with a project provision operation.", - "id": "GoogleCloudDiscoveryengineV1alphaProvisionProjectMetadata", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the PurgeCompletionSuggestions operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse": { - "description": "Response message for CompletionService.PurgeCompletionSuggestions method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "maxExtractiveAnswerCount": { + "description": "The maximum number of extractive answers returned in each search result. An extractive answer is a verbatim answer extracted from the original document, which provides a precise and contextually relevant answer to the search query. If the number of matching answers is less than the `max_extractive_answer_count`, return all of the answers. Otherwise, return the `max_extractive_answer_count`. At most five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" }, - "purgeSucceeded": { - "description": "Whether the completion suggestions were successfully purged.", + "maxExtractiveSegmentCount": { + "description": "The max number of extractive segments returned in each search result. Only applied if the DataStore is set to DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from the original document that is relevant to the search query, and, in general, more verbose than an extractive answer. The segment could then be used as input for LLMs to generate summaries and answers. If the number of matching segments is less than `max_extractive_segment_count`, return all of the segments. Otherwise, return the `max_extractive_segment_count`.", + "format": "int32", + "type": "integer" + }, + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", - "type": "string" + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", - "type": "string" + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "returnSnippet": { + "description": "If `true`, then return snippet. If no snippet can be generated, we return \"No snippet is available for this page.\" A `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", - "format": "int64", + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No summary is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating summaries for adversarial queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreNonSummarySeekingQuery": { + "description": "Specifies whether to filter out queries that are not summary-seeking. The default value is `false`. Google employs search-query classification to detect summary-seeking queries. No summary is returned if the search query is classified as a non-summary seeking query. For example, `why is the sky blue` and `Who is the best soccer player in the world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` are not. They are most likely navigational queries. If this field is set to `true`, we skip generating summaries for non-summary seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citations in the summary. The default value is `false`. When this field is set to `true`, summaries include in-line citation numbers. Example summary including citations: BigQuery is Google Cloud's fully managed and completely serverless enterprise data warehouse [1]. BigQuery supports all data types, works across clouds, and has built-in machine learning and business intelligence, all within a unified platform [2, 3]. The citation numbers refer to the returned search results and are 1-indexed. For example, [1] means that the sentence is attributed to the first search result. [2, 3] means that the sentence is attributed to both the second and third search results.", + "type": "boolean" + }, + "languageCode": { + "description": "Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", - "items": { - "type": "string" - }, - "type": "array" + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "The number of top results to generate the summary from. If the number of results returned is less than `summaryResultCount`, the summary is generated from all of the results. At most 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec", "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", + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { - "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec": { + "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "dataStore": { + "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec": { + "description": "The specification that uses customized query embedding vector to do semantic document retrieval.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec", "properties": { - "purgeCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", - "type": "string" + "embeddingVectors": { + "description": "The embedding vector used for retrieval. Limit to 1.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaQuery": { - "description": "Defines a user inputed query.", - "id": "GoogleCloudDiscoveryengineV1alphaQuery", + "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector": { + "description": "Embedding vector.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector", "properties": { - "queryId": { - "description": "Unique Id for the query.", + "fieldPath": { + "description": "Embedding field path in schema.", "type": "string" }, - "text": { - "description": "Plain text.", - "type": "string" + "vector": { + "description": "Query embedding vector.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec": { + "description": "A facet specification to perform faceted search.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "enableDynamicPosition": { + "description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined automatically. If dynamic facets are enabled, it is ordered together. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined automatically. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enabled, which generates a facet `gender`. Then the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how API orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position is false.", + "type": "boolean" }, - "invalidUris": { - "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", + "excludedFilterKeys": { + "description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 documents with the color facet \"Red\" and 200 documents with the color facet \"Blue\". A query containing the filter \"color:ANY(\"Red\")\" and having \"color\" as FacetKey.key would by default return only \"Red\" documents in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue documents available, \"Blue\" would not be shown as an available facet value. If \"color\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"color\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" documents. A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.", "items": { "type": "string" }, "type": "array" }, - "pendingCount": { - "description": "Total number of URIs that have yet to be crawled.", - "format": "int32", - "type": "integer" + "facetKey": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", + "description": "Required. The facet key specification." }, - "quotaExceededCount": { - "description": "Total number of URIs that were rejected due to insufficient indexing resources.", + "limit": { + "description": "Maximum facet values that are returned for this facet. If unspecified, defaults to 20. The maximum allowed value is 300. Values above 300 are coerced to 300. For aggregation in healthcare search, when the [FacetKey.key] is \"healthcare_aggregation_key\", the limit will be overridden to 10,000 internally, regardless of the value set here. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey": { + "description": "Specifies how a facet is computed.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey", + "properties": { + "caseInsensitive": { + "description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", + "type": "boolean" }, - "successCount": { - "description": "Total number of URIs that have been crawled so far.", - "format": "int32", - "type": "integer" + "contains": { + "description": "Only get facet values that contain the given strings. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"contains\" to \"2022\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Sci-Fi \u003e 2022\". Only supported on textual fields. Maximum is 10.", + "items": { + "type": "string" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "intervals": { + "description": "Set only if values should be bucketed into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 30.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaInterval" + }, + "type": "array" + }, + "key": { + "description": "Required. Supported textual and numerical facet keys in Document object, over which the facet values are computed. Facet key is case-sensitive.", + "type": "string" + }, + "orderBy": { + "description": "The order in which documents are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals.", "type": "string" }, - "validUrisCount": { - "description": "Total number of unique URIs in the request that are not in invalid_uris.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { - "description": "Response message for SiteSearchEngineService.RecrawlUris method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", - "properties": { - "failedUris": { - "description": "URIs that were not crawled before the LRO terminated.", + "prefixes": { + "description": "Only get facet values that start with the given string prefix. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"prefixes\" to \"Action\", the \"category\" facet only contains \"Action \u003e 2022\" and \"Action \u003e 2021\". Only supported on textual fields. Maximum is 10.", "items": { "type": "string" }, "type": "array" }, - "failureSamples": { - "description": "Details for a sample of up to 10 `failed_uris`.", + "restrictedValues": { + "description": "Only get facet for the given restricted values. Only supported on textual fields. For example, suppose \"category\" has three values \"Action \u003e 2022\", \"Action \u003e 2021\" and \"Sci-Fi \u003e 2022\". If set \"restricted_values\" to \"Action \u003e 2022\", the \"category\" facet only contains \"Action \u003e 2022\". Only supported on textual fields. Maximum is 10.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" + "type": "string" }, "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { - "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", + "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery": { + "description": "Specifies the image query input.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery", "properties": { - "failureReasons": { - "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", + "imageBytes": { + "description": "Base64 encoded image bytes. Supported image formats: JPEG, PNG, and BMP.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec": { + "description": "Specification to enable natural language understanding capabilities for search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec", + "properties": { + "filterExtractionCondition": { + "description": "The condition under which filter extraction should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables NL filter extraction.", + "Enables NL filter extraction." + ], + "type": "string" + }, + "geoSearchQueryDetectionFieldNames": { + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" + "type": "string" }, "type": "array" - }, - "uri": { - "description": "URI that failed to be crawled.", - "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { - "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", + "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec": { + "description": "Specification to determine under which conditions query expansion should occur.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec", "properties": { - "corpusType": { - "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", + "condition": { + "description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", "enum": [ - "CORPUS_TYPE_UNSPECIFIED", - "DESKTOP", - "MOBILE" + "CONDITION_UNSPECIFIED", + "DISABLED", + "AUTO" ], "enumDescriptions": [ - "Default value.", - "Denotes a crawling attempt for the desktop version of a page.", - "Denotes a crawling attempt for the mobile version of a page." + "Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", + "Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", + "Automatic query expansion built by the Search API." ], "type": "string" }, - "errorMessage": { - "description": "Reason why the URI was not crawled.", + "pinUnexpandedResults": { + "description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec": { + "description": "Specification for search as you type in search requests.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec", + "properties": { + "condition": { + "description": "The condition under which search as you type should occur. Default to Condition.DISABLED.", + "enum": [ + "CONDITION_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Server behavior defaults to Condition.DISABLED.", + "Disables Search As You Type.", + "Enables Search As You Type." + ], "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSchema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1alphaSchema", + "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec": { + "description": "Session specification. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec", "properties": { - "fieldConfigs": { - "description": "Output only. Configurations for fields of the schema.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" - }, - "readOnly": true, - "type": "array" - }, - "jsonSchema": { - "description": "The JSON representation of the schema.", + "queryId": { + "description": "If set, the search result gets stored to the \"turn\" specified by this query ID. Example: Let's say the session looks like this: session { name: \".../sessions/xxx\" turns { query { text: \"What is foo?\" query_id: \".../questions/yyy\" } answer: \"Foo is ...\" } turns { query { text: \"How about bar then?\" query_id: \".../questions/zzz\" } } } The user can call /search API with a request like this: session: \".../sessions/xxx\" session_spec { query_id: \".../questions/zzz\" } Then, the API stores the search result, associated with the last turn. The stored search result can be used by a subsequent /answer API call (with the session ID and the query ID specified). Also, it is possible to call /search and /answer in parallel with the same session ID \u0026 query ID.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "searchResultPersistenceCount": { + "description": "The number of top search results to persist. The persisted search results can be used for the subsequent /answer api call. This field is simliar to the `summary_result_count` field in SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 results for documents mode, or 50 for chunks mode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec": { + "description": "The specification for query spell correction.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec", + "properties": { + "mode": { + "description": "The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO.", + "enum": [ + "MODE_UNSPECIFIED", + "SUGGESTION_ONLY", + "AUTO" + ], + "enumDescriptions": [ + "Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", + "Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query. The spelling suggestion won't be used as the search query.", + "Automatic spell correction built by the Search API. Search will be based on the corrected query if found." + ], "type": "string" - }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" } }, "type": "object" @@ -10092,6 +11477,29 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.SetUriPatternDocumentData operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse": { + "description": "Response message for SiteSearchEngineService.SetUriPatternDocumentData method.", + "id": "GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", @@ -10324,6 +11732,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUserInfo": { + "description": "Information of an end user.", + "id": "GoogleCloudDiscoveryengineV1alphaUserInfo", + "properties": { + "userAgent": { + "description": "User agent as included in the HTTP header. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if UserEvent.direct_user_request is set.", + "type": "string" + }, + "userId": { + "description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAlloyDbSource": { "description": "AlloyDB source import data from.", "id": "GoogleCloudDiscoveryengineV1betaAlloyDbSource", @@ -10716,7 +12139,7 @@ "type": "string" }, "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", "enum": [ "SEARCH_RESULT_MODE_UNSPECIFIED", "DOCUMENTS", @@ -10867,7 +12290,7 @@ "properties": { "answer": { "$ref": "GoogleCloudDiscoveryengineV1betaAnswer", - "description": "Answer resource object. If AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." + "description": "Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." }, "answerQueryToken": { "description": "A global unique ID used for logging.", @@ -11131,7 +12554,7 @@ "description": "Properties of the object.", "type": "any" }, - "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document (code pointer: http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: http://shortn/_Ipo6KFFGBL).", + "description": "Data representation. The structured JSON data for the document. It's populated from the struct data from the Document , or the Chunk in search result .", "type": "object" }, "title": { @@ -12142,6 +13565,12 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata": { + "description": "Metadata for EvaluationService.CreateEvaluation method.", + "id": "GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata": { "description": "Metadata for Create Schema LRO.", "id": "GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata", @@ -12859,48 +14288,138 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "GoogleCloudDiscoveryengineV1betaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", + "properties": { + "companyName": { + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEvaluation": { + "description": "An evaluation is a single execution (or run) of an evaluation process. It encapsulates the state of the evaluation and the resulting data.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluation", + "properties": { + "createTime": { + "description": "Output only. Timestamp the Evaluation was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. Timestamp the Evaluation was completed at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "Output only. The error that occurred during evaluation. Only populated when the evaluation's state is FAILED.", + "readOnly": true + }, + "errorSamples": { + "description": "Output only. A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "readOnly": true, + "type": "array" + }, + "evaluationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", + "description": "Required. The specification of the evaluation." + }, + "name": { + "description": "Immutable. The full resource name of the Evaluation, in the format of `projects/{project}/locations/{location}/evaluations/{evaluation}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, averaged across all SampleQuerys in the SampleQuerySet. Only populated when the evaluation's state is SUCCEEDED.", + "readOnly": true + }, + "state": { + "description": "Output only. The state of the evaluation.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The evaluation is unspecified.", + "The service is preparing to run the evaluation.", + "The evaluation is in progress.", + "The evaluation completed successfully.", + "The evaluation failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec": { + "description": "Describes the specification of the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec", "properties": { - "companyName": { - "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", - "type": "string" + "querySetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", + "description": "Required. The specification of the query set." + }, + "searchRequest": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest", + "description": "Required. The search request that is used to perform the evaluation. Only the following fields within SearchRequest are supported; if any other fields are provided, an UNSUPPORTED error will be returned: * SearchRequest.serving_config * SearchRequest.branch * SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * SearchRequest.user_pseudo_id" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec": { + "description": "Describes the specification of the query set.", + "id": "GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", - "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" - }, - "type": "array" - }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], + "sampleQuerySet": { + "description": "Required. The full resource name of the SampleQuerySet used for the evaluation, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`.", "type": "string" } }, @@ -13261,6 +14780,93 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata": { + "description": "Metadata related to the progress of the ImportSampleQueries operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata", + "properties": { + "createTime": { + "description": "ImportSampleQueries operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of SampleQuerys that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of SampleQuerys successfully imported.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of SampleQuerys that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "ImportSampleQueries operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest": { + "description": "Request message for SampleQueryService.ImportSampleQueries method.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest", + "properties": { + "bigquerySource": { + "$ref": "GoogleCloudDiscoveryengineV1betaBigQuerySource", + "description": "BigQuery input source." + }, + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "gcsSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaGcsSource", + "description": "Cloud Storage location for the input content." + }, + "inlineSource": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource", + "description": "The Inline source for sample query entries." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource": { + "description": "The inline source for SampleQuerys.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource", + "properties": { + "sampleQueries": { + "description": "Required. A list of SampleQuerys to import. Max of 1000 items.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse": { + "description": "Response of the SampleQueryService.ImportSampleQueries method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaImportErrorConfig", + "description": "The desired location of errors incurred during the Import." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata": { "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata", @@ -13580,6 +15186,95 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse": { + "description": "Response message for EvaluationService.ListEvaluationResults method.", + "id": "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse", + "properties": { + "evaluationResults": { + "description": "The EvaluationResults.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListEvaluationResultsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult": { + "description": "Represents the results of an evaluation for a single SampleQuery.", + "id": "GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult", + "properties": { + "qualityMetrics": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "description": "Output only. The metrics produced by the evaluation, for a given SampleQuery.", + "readOnly": true + }, + "sampleQuery": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery", + "description": "Output only. The SampleQuery that was evaluated.", + "readOnly": true + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListEvaluationsResponse": { + "description": "Response message for EvaluationService.ListEvaluations method.", + "id": "GoogleCloudDiscoveryengineV1betaListEvaluationsResponse", + "properties": { + "evaluations": { + "description": "The Evaluations.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaEvaluation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that can be sent as ListEvaluationsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse": { + "description": "Response message for SampleQueryService.ListSampleQueries method.", + "id": "GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as ListSampleQueriesRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "sampleQueries": { + "description": "The SampleQuerys.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuery" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse": { + "description": "Response message for SampleQuerySetService.ListSampleQuerySets method.", + "id": "GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as ListSampleQuerySetsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "sampleQuerySets": { + "description": "The SampleQuerySets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQuerySet" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListSchemasResponse": { "description": "Response message for SchemaService.ListSchemas method.", "id": "GoogleCloudDiscoveryengineV1betaListSchemasResponse", @@ -13936,6 +15631,60 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaQualityMetrics": { + "description": "Describes the metrics produced by the evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetrics", + "properties": { + "docNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "docPrecision": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8" + }, + "docRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6" + }, + "pageNdcg": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose SampleQuery with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693" + }, + "pageRecall": { + "$ref": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "description": "Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics": { + "description": "Stores the metric values at specific top-k levels.", + "id": "GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics", + "properties": { + "top1": { + "description": "The top-1 value.", + "format": "double", + "type": "number" + }, + "top10": { + "description": "The top-10 value.", + "format": "double", + "type": "number" + }, + "top3": { + "description": "The top-3 value.", + "format": "double", + "type": "number" + }, + "top5": { + "description": "The top-5 value.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaQuery": { "description": "Defines a user inputed query.", "id": "GoogleCloudDiscoveryengineV1betaQuery", @@ -14186,6 +15935,94 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSampleQuery": { + "description": "Sample Query captures metadata to be used for evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaSampleQuery", + "properties": { + "createTime": { + "description": "Output only. Timestamp the SampleQuery was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the sample query, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "queryEntry": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry", + "description": "The query entry." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry": { + "description": "Query Entry captures metadata to be used for search evaluation.", + "id": "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry", + "properties": { + "query": { + "description": "Required. The query.", + "type": "string" + }, + "targets": { + "description": "List of targets for the query.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget": { + "description": "Defines the parameters of the query's expected outcome.", + "id": "GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget", + "properties": { + "pageNumbers": { + "description": "Expected page numbers of the target. Each page number must be non negative.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "score": { + "description": "Relevance score of the target.", + "format": "double", + "type": "number" + }, + "uri": { + "description": "Expected uri of the target. This field must be a UTF-8 encoded string with a length limit of 2048 characters. Example of valid uris: `https://example.com/abc`, `gcs://example/example.pdf`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSampleQuerySet": { + "description": "A SampleQuerySet is the parent resource of SampleQuery, and contains the configurations shared by all SampleQuery under it.", + "id": "GoogleCloudDiscoveryengineV1betaSampleQuerySet", + "properties": { + "createTime": { + "description": "Output only. Timestamp the SampleQuerySet was created at.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the SampleQuerySet.", + "type": "string" + }, + "displayName": { + "description": "Required. The sample query set display name. This field must be a UTF-8 encoded string with a length limit of 128 characters.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the SampleQuerySet, in the format of `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSchema": { "description": "Defines the structure and layout of a type of document data.", "id": "GoogleCloudDiscoveryengineV1betaSchema", @@ -14332,6 +16169,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec", "description": "Search as you type configuration. Only supported for the IndustryVertical.MEDIA vertical." }, + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "type": "string" + }, "session": { "description": "The session resource name. Optional. Session allows users to do multi-turn /search API calls or coordination between /search API calls and /answer API calls. Example #1 (multi-turn /search API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /search API with the session ID generated in the first call. Here, the previous search query gets considered in query standing. I.e., if the first query is \"How did Alphabet do in 2022?\" and the current query is \"How about 2023?\", the current query will be interpreted as \"How did Alphabet do in 2023?\". Example #2 (coordination between /search API calls and /answer API calls): 1. Call /search API with the auto-session mode (see below). 2. Call /answer API with the session ID generated in the first call. Here, the answer generation happens in the context of the search results from the first search call. Auto-session mode: when `projects/.../sessions/-` is used, a new session gets automatically created. Otherwise, users can use the create-session API to create a session manually. Multi-turn Search feature is currently at private GA stage. Please use v1alpha or v1beta version instead before we launch this feature to public GA. Or ask for allowlisting through Google Support team.", "type": "string" @@ -14469,7 +16310,7 @@ "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", "enum": [ "SEARCH_RESULT_MODE_UNSPECIFIED", "DOCUMENTS", @@ -14773,7 +16614,7 @@ "type": "string" }, "geoSearchQueryDetectionFieldNames": { - "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in Servingconfig.geo_search_query_detection_field_names.", + "description": "Field names used for location-based filtering, where geolocation filters are detected in natural language search queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. If this field is set, it overrides the field names set in ServingConfig.geo_search_query_detection_field_names.", "items": { "type": "string" }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index cf892805cc7..0510c95cbc0 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -859,6 +859,7 @@ type ProjectsLocationsRankingConfigsService struct { func NewProjectsLocationsSampleQuerySetsService(s *Service) *ProjectsLocationsSampleQuerySetsService { rs := &ProjectsLocationsSampleQuerySetsService{s: s} rs.Operations = NewProjectsLocationsSampleQuerySetsOperationsService(s) + rs.SampleQueries = NewProjectsLocationsSampleQuerySetsSampleQueriesService(s) return rs } @@ -866,6 +867,8 @@ type ProjectsLocationsSampleQuerySetsService struct { s *Service Operations *ProjectsLocationsSampleQuerySetsOperationsService + + SampleQueries *ProjectsLocationsSampleQuerySetsSampleQueriesService } func NewProjectsLocationsSampleQuerySetsOperationsService(s *Service) *ProjectsLocationsSampleQuerySetsOperationsService { @@ -877,6 +880,15 @@ type ProjectsLocationsSampleQuerySetsOperationsService struct { s *Service } +func NewProjectsLocationsSampleQuerySetsSampleQueriesService(s *Service) *ProjectsLocationsSampleQuerySetsSampleQueriesService { + rs := &ProjectsLocationsSampleQuerySetsSampleQueriesService{s: s} + return rs +} + +type ProjectsLocationsSampleQuerySetsSampleQueriesService struct { + s *Service +} + func NewProjectsLocationsUserEventsService(s *Service) *ProjectsLocationsUserEventsService { rs := &ProjectsLocationsUserEventsService{s: s} return rs @@ -3410,9 +3422,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult st // level snippets. SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document (code pointer: - // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: - // http://shortn/_Ipo6KFFGBL). + // It's populated from the struct data from the Document , or the Chunk in + // search result . StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` @@ -3910,6 +3921,11 @@ func (s GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1alphaCreateEvaluationMetadata struct { +} + // GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for Create // Schema LRO. type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { @@ -3963,6 +3979,30 @@ func (s GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec: Defines custom fine +// tuning spec. +type GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec struct { + // EnableSearchAdaptor: Whether or not to enable and include custom fine tuned + // search adaptor model. + EnableSearchAdaptor bool `json:"enableSearchAdaptor,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableSearchAdaptor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableSearchAdaptor") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaCustomTuningModel: Metadata that describes // a custom tuned model. type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { @@ -4896,6 +4936,113 @@ func (s GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1alphaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1alphaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,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 GoogleCloudDiscoveryengineV1alphaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEvaluationEvaluationSpecQuerySetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaExportUserEventsMetadata: Metadata related // to the progress of the Export operation. This is returned by the // google.longrunning.Operation.metadata field. @@ -5116,6 +5263,31 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.GetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { + // DocumentDataMap: Document data keyed by URI pattern. For example: + // document_data_map = { "www.url1.com/*": { "Categories": ["category1", + // "category2"] }, "www.url2.com/*": { "Categories": ["category3"] } } + DocumentDataMap map[string]googleapi.RawMessage `json:"documentDataMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocumentDataMap") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocumentDataMap") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { // ExternalIdpConfig: External Identity provider config. @@ -5315,6 +5487,66 @@ func (s GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of SampleQuerys that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of SampleQuerys successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse: Response of +// the SampleQueryService.ImportSampleQueries method. If the long running +// operation is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSampleQueriesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata: // Metadata related to the progress of the ImportSuggestionDenyListEntries // operation. This is returned by the google.longrunning.Operation.metadata @@ -5436,6 +5668,54 @@ func (s GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1alphaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} + // GoogleCloudDiscoveryengineV1alphaLanguageInfo: Language info for DataStore. type GoogleCloudDiscoveryengineV1alphaLanguageInfo struct { // Language: Output only. Language part of normalized_language_code. E.g.: @@ -5851,6 +6131,109 @@ func (s GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1alphaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DocNdcg") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics: Stores the +// metric values at specific top-k levels. +type GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + // GoogleCloudDiscoveryengineV1alphaQuery: Defines a user inputed query. type GoogleCloudDiscoveryengineV1alphaQuery struct { // QueryId: Unique Id for the query. @@ -6033,2063 +6416,2413 @@ func (s GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. -type GoogleCloudDiscoveryengineV1alphaSession struct { - // EndTime: Output only. The time the session finished. - EndTime string `json:"endTime,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/engines/{engine - // }/sessions/*` - Name string `json:"name,omitempty"` - // StartTime: Output only. The time the session started. - StartTime string `json:"startTime,omitempty"` - // State: The state of the session. +// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave + // this field empty, to search documents under the default branch. + Branch string `json:"branch,omitempty"` + // CanonicalFilter: The default filter that is applied when a user performs a + // search without checking any filters on the search page. The filter applied + // to every search request when quality improvement such as query expansion is + // needed. In the case a query does not have a sufficient amount of results + // this filter will be used to determine whether or not to enable the query + // expansion flow. The original filter will still be used for the query + // expanded search. This field is strongly recommended to achieve high search + // quality. For more information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of content + // search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // CustomFineTuningSpec: Custom fine tuning configs. If set, it has higher + // priority than the configs set in ServingConfig.custom_fine_tuning_spec. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it + // will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no facets are + // returned. A maximum of 100 values are allowed. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For + // more information, see Standard fields + // (https://cloud.google.com/apis/design/standard_fields). This field helps to + // better interpret the query. If a value isn't specified, the query language + // code is automatically detected, which may not be accurate. + LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that is, + // starting result location, amongst the Documents deemed by the API as + // relevant) in search results. This field is only considered if page_token is + // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering + // for retail search, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field + // is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of Documents to return. The maximum allowed value + // depends on the data type. Values above the maximum value are coerced to the + // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * + // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: + // Default `50`, Maximum `100`. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to SearchService.Search must match the call that + // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageToken string `json:"pageToken,omitempty"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. If set + // to non-empty, results are restricted or boosted based on the location + // provided. For example, `user_country_code: "au" For available codes see + // Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which enables + // image searching. For example, `search_type: 1` + Params googleapi.RawMessage `json:"params,omitempty"` + // Query: Raw search query. + Query string `json:"query,omitempty"` + // QueryExpansionSpec: The query expansion specification that specifies the + // conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. This overrides ServingConfig.ranking_expression. The + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RegionCode: 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. + 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: - // "STATE_UNSPECIFIED" - State is unspecified. - // "IN_PROGRESS" - The session is currently open. - State string `json:"state,omitempty"` - // Turns: Turns. - Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` - // UserPseudoId: A unique identifier for tracking users. + // "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"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` + // SpellCorrectionSpec: The spell correction specification that specifies the + // mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // UserInfo: Information about the end user. Highly recommended for analytics. + // UserInfo.user_agent is used to deduce `device_type` for analytics. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. This should be the same + // identifier as UserEvent.user_pseudo_id and + // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. UserPseudoId string `json:"userPseudoId,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 + // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSession +func (s GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, including a -// query from the user and a answer from service. -type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { - // Answer: The resource name of the answer to the user query. Only set if the - // answer generation (/answer API call) happened in this turn. - Answer string `json:"answer,omitempty"` - // Query: The user query. - Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost specification +// to boost certain documents. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document matches + // multiple conditions in the specifictions, boost scores from these + // specifications are all applied and combined in a non-linear way. Maximum + // number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Answer") 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. "ConditionBoostSpecs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the ownership and - // validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website that - // opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec: +// Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a + // big promotion. However, it does not necessarily mean that the boosted + // document will be the top result at all times, nor that other documents will + // be excluded. Results could still be shown even when none of them matches the + // condition. And results that are significantly more relevant to the search + // query can still trump your heavily favored but irrelevant documents. Setting + // to -1.0 gives the document a big demotion. However, results that are deeply + // relevant might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. Setting to + // 0.0 means no boost applied. The boosting condition is ignored. Only one of + // the (condition, boost) combination or the boost_control_spec below are set. + // If both are set then the global boost is ignored and the more fine-grained + // boost_control_spec is applied. + Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` + // Condition: An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * To boost + // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": + // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") 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. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1alphaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated to - // include all pages whose address contains the provided_uri_pattern. If set to - // true, an uri_pattern is generated to try to be an exact match of the - // provided_uri_pattern or just the specific page if the provided_uri_pattern - // is a specific one. provided_uri_pattern is always normalized to generate the - // URI pattern to be used by the search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` - // GeneratedUriPattern: Output only. This is system-generated based on the - // provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be picked up - // by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to be - // deleted. This is a transitioning state which will resulted in either: 1. - // target site deleted if unindexing is successful; 2. state reverts to - // SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - // Name: Output only. The fully qualified resource name of the target site. - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` - // ProvidedUriPattern: Required. Input only. The user provided URI pattern from - // which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - // RootDomainUri: Output only. Root domain of the provided_uri_pattern. - RootDomainUri string `json:"rootDomainUri,omitempty"` - // SiteVerificationInfo: Output only. Site ownership and validity verification - // status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be included - // or excluded. +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoos +// tControlSpec: 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 GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: 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: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior - // defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // "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]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: 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. "ExactMatch") to include in API + // 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 GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoos +// tControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: 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: 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. "QuotaFailure") 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. "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 GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: Failed -// due to insufficient quota. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total quota - // this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + 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 +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") 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. "ChunkSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata related -// to the progress of the TrainCustomModel operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response of the -// TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveCont +// entSpec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers returned + // in each search result. An extractive answer is a verbatim answer extracted + // from the original document, which provides a precise and contextually + // relevant answer to the search query. If the number of matching answers is + // less than the `max_extractive_answer_count`, return all of the answers. + // Otherwise, return the `max_extractive_answer_count`. At most five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments returned in + // each search result. Only applied if the DataStore is set to + // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is + // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from + // the original document that is relevant to the search query, and, in general, + // more verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. If the number of matching + // segments is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent from + // each selected segments. Return at most `num_previous_segments` segments + // before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata associated -// with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune applies to. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` - Engine string `json:"engine,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec: +// A specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet + // return, use `return_snippet` field. For backwards compatibility, we will + // return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect + // on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be + // returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engine") 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. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response associated -// with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { -} - -// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec: +// A specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No summary is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that + // are not summary-seeking. The default value is `false`. Google employs + // search-query classification to detect summary-seeking queries. No summary is + // returned if the search query is classified as a non-summary seeking query. + // For example, `why is the sky blue` and `Who is the best soccer player in the + // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` + // are not. They are most likely navigational queries. If this field is set to + // `true`, we skip generating summaries for non-summary seeking queries and + // return fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citations in the summary. The + // default value is `false`. When this field is set to `true`, summaries + // include in-line citation numbers. Example summary including citations: + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business intelligence, + // all within a unified platform [2, 3]. The citation numbers refer to the + // returned search results and are 1-indexed. For example, [1] means that the + // sentence is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // SummaryResultCount: The number of top results to generate the summary from. + // If the number of results returned is less than `summaryResultCount`, the + // summary is generated from all of the results. At most 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata 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 +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMod +// elPromptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAlloyDbSource: AlloyDB source import data -// from. -type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { - // ClusterId: Required. The AlloyDB cluster to copy the data from with a length - // limit of 256 characters. - ClusterId string `json:"clusterId,omitempty"` - // DatabaseId: Required. The AlloyDB database to copy the data from with a - // length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the import with - // a length limit of 2,000 characters. Can be specified if one wants to have - // the AlloyDB export to a specific Cloud Storage directory. Ensure that the - // AlloyDB service account has the necessary Cloud Storage Admin permissions to - // access the specified Cloud Storage directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // 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 string `json:"projectId,omitempty"` - // TableId: Required. The AlloyDB table to copy the data from with a length - // limit of 256 characters. - TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ClusterId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecMod +// elSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClusterId") to include in API + // NullFields is a list of field names (e.g. "Version") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAlloyDbSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAlloyDbSource +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswer: Defines an answer. -type GoogleCloudDiscoveryengineV1betaAnswer struct { - // AnswerSkippedReasons: Additional answer-skipped reasons. This provides the - // reason for ignored cases. If nothing is skipped, this field is not set. - // - // Possible values: - // "ANSWER_SKIPPED_REASON_UNSPECIFIED" - Default value. The answer skipped - // reason is not specified. - // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. - // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored - // case. - // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. - // Google skips the answer if there are no high-relevance search results. - // "POTENTIAL_POLICY_VIOLATION" - 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. - // "NO_RELEVANT_CONTENT" - The no relevant content case. Google skips the - // answer if there is no relevant content in the retrieved search results. - AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` - // AnswerText: The textual answer. - AnswerText string `json:"answerText,omitempty"` - // Citations: Citations. - Citations []*GoogleCloudDiscoveryengineV1betaAnswerCitation `json:"citations,omitempty"` - // CompleteTime: Output only. Answer completed timestamp. - CompleteTime string `json:"completeTime,omitempty"` - // CreateTime: Output only. Answer creation timestamp. - CreateTime string `json:"createTime,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/engines/{engine - // }/sessions/*/answers/*` - Name string `json:"name,omitempty"` - // QueryUnderstandingInfo: Query understanding information. - QueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo `json:"queryUnderstandingInfo,omitempty"` - // References: References. - References []*GoogleCloudDiscoveryengineV1betaAnswerReference `json:"references,omitempty"` - // RelatedQuestions: Suggested related questions. - RelatedQuestions []string `json:"relatedQuestions,omitempty"` - // State: The state of the answer generation. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unknown. - // "IN_PROGRESS" - Answer generation is currently in progress. - // "FAILED" - Answer generation currently failed. - // "SUCCEEDED" - Answer generation has succeeded. - State string `json:"state,omitempty"` - // Steps: Answer generation steps. - Steps []*GoogleCloudDiscoveryengineV1betaAnswerStep `json:"steps,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AnswerSkippedReasons") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec: A struct to +// define data stores to filter on in a search call and configurations for +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. +type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnswerSkippedReasons") 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. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswer +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a segment. -type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { - // EndIndex: End of the attributed segment, exclusive. - EndIndex int64 `json:"endIndex,omitempty,string"` - // Sources: Citation sources for the attributed segment. - Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` - // StartIndex: Index indicates the start of the segment, measured in bytes - // (UTF-8 unicode). - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do semantic +// document retrieval. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") 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. "EmbeddingVectors") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerCitation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitation +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerCitationSource: Citation source. -type GoogleCloudDiscoveryengineV1betaAnswerCitationSource struct { - // ReferenceId: ID of the citation source. - ReferenceId string `json:"referenceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReferenceId") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector: +// Embedding vector. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReferenceId") to include in API + // NullFields is a list of field names (e.g. "FieldPath") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitationSource +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequest: Request message for -// ConversationalSearchService.AnswerQuery method. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { - // AnswerGenerationSpec: Answer generation specification. - AnswerGenerationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` - // AsynchronousMode: Asynchronous mode control. If enabled, the response will - // be returned with answer/session resource name without final answer. The API - // users need to do the polling to get the latest status of answer/session by - // calling ConversationalSearchService.GetAnswer or - // ConversationalSearchService.GetSession method. - AsynchronousMode bool `json:"asynchronousMode,omitempty"` - // Query: Required. Current user query. - Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` - // QueryUnderstandingSpec: Query understanding specification. - QueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec `json:"queryUnderstandingSpec,omitempty"` - // RelatedQuestionsSpec: Related questions specification. - RelatedQuestionsSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec `json:"relatedQuestionsSpec,omitempty"` - // SafetySpec: Model specification. - SafetySpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec `json:"safetySpec,omitempty"` - // SearchSpec: Search specification. - SearchSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec `json:"searchSpec,omitempty"` - // Session: The session resource name. Not required. When session field is not - // set, the API is in sessionless mode. We support auto session mode: users can - // use the wildcard symbol `-` as session ID. A new ID will be automatically - // generated and assigned. - Session string `json:"session,omitempty"` - // UserLabels: The user labels applied to a resource must meet the following - // requirements: * Each resource can have multiple labels, up to a maximum of - // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 - // character and a maximum length of 63 characters and cannot be empty. Values - // can be empty and have a maximum length of 63 characters. * Keys and values - // can contain only lowercase letters, numeric characters, underscores, and - // dashes. All characters must use UTF-8 encoding, and international characters - // are allowed. * The key portion of a label must be unique. However, you can - // use the same key with multiple resources. * Keys must start with a lowercase - // letter or international character. See Google Cloud Document - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - // UserPseudoId: A unique identifier for tracking visitors. For example, this - // could be implemented with an HTTP cookie, which should be able to uniquely - // identify a visitor on a single device. This unique identifier should not - // change if the visitor logs in or out of the website. This field should NOT - // have a fixed value such as `unknown_visitor`. The field must be a UTF-8 - // encoded string with a length limit of 128 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - UserPseudoId string `json:"userPseudoId,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnswerGenerationSpec") to +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If set to + // true, the position of this facet among all facets in the response is + // determined automatically. If dynamic facets are enabled, it is ordered + // together. If set to false, the position of this facet in the response is the + // same as in the request, and it is ranked before the facets with dynamic + // position enable and all dynamic facets. For example, you may always want to + // have rating facet returned in the response, but it's not necessarily to + // always display the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet in + // response is determined automatically. Another example, assuming you have the + // following facets in the request: * "rating", enable_dynamic_position = true + // * "price", enable_dynamic_position = false * "brands", + // enable_dynamic_position = false And also you have a dynamic facets enabled, + // which generates a facet `gender`. Then the final order of the facets in the + // response can be ("price", "brands", "rating", "gender") or ("price", + // "brands", "gender", "rating") depends on how API orders "gender" and + // "rating" facets. However, notice that "price" and "brands" are always ranked + // at first and second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By default, + // FacetKey.key is not excluded from the filter unless it is listed in this + // field. Listing a facet key in this field allows its values to appear as + // facet results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. For example, suppose + // there are 100 documents with the color facet "Red" and 200 documents with + // the color facet "Blue". A query containing the filter "color:ANY("Red")" and + // having "color" as FacetKey.key would by default return only "Red" documents + // in the search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" would + // not be shown as an available facet value. If "color" is listed in + // "excludedFilterKeys", then the query returns the facet values "Red" with + // count 100 and "Blue" with count 200, because the "color" key is now excluded + // from the filter. Because this field doesn't affect search results, the + // search results are still correctly filtered to return only "Red" documents. + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error + // is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Limit: Maximum facet values that are returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values above + // 300 are coerced to 300. For aggregation in healthcare search, when the + // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden + // to 10,000 internally, regardless of the value set here. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnswerGenerationSpec") 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. "EnableDynamicPosition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequest +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec: -// Answer generation specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec struct { - // AnswerLanguageCode: Language code for Answer. Use language tags defined by - // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an - // experimental feature. - AnswerLanguageCode string `json:"answerLanguageCode,omitempty"` - // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. - // The default value is `false`. Google employs search-query classification to - // detect adversarial queries. No answer is returned if the search query is - // classified as an adversarial query. For example, a user might ask a question - // regarding negative comments about the company or submit a query designed to - // generate unsafe, policy-violating output. If this field is set to `true`, we - // skip generating answers for adversarial queries and return fallback messages - // instead. - IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // IgnoreLowRelevantContent: Specifies whether to filter out queries that have - // low relevance. If this field is set to `false`, all search results are used - // regardless of relevance to generate answers. If set to `true` or unset, the - // behavior will be determined automatically by the service. - IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` - // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries that - // are not answer-seeking. The default value is `false`. Google employs - // search-query classification to detect answer-seeking queries. No answer is - // returned if the search query is classified as a non-answer seeking query. If - // this field is set to `true`, we skip generating answers for non-answer - // seeking queries and return fallback messages instead. - IgnoreNonAnswerSeekingQuery bool `json:"ignoreNonAnswerSeekingQuery,omitempty"` - // IncludeCitations: Specifies whether to include citation metadata in the - // answer. The default value is `false`. - IncludeCitations bool `json:"includeCitations,omitempty"` - // ModelSpec: Answer generation model specification. - ModelSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec `json:"modelSpec,omitempty"` - // PromptSpec: Answer generation prompt specification. - PromptSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec `json:"promptSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnswerLanguageCode") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: Specifies +// how a facet is computed. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when getting + // faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + // Contains: Only get facet values that contain the given strings. For example, + // suppose "category" has three values "Action > 2022", "Action > 2021" and + // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only + // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual + // fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values are: * + // "count desc", which means order by SearchResponse.Facet.values.count + // descending. * "value desc", which means order by + // SearchResponse.Facet.values.value descending. Only applies to textual + // facets. If not set, textual values are sorted in natural order + // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are + // sorted in the order given by FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + // Prefixes: Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", "Action > + // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" + // facet only contains "Action > 2022" and "Action > 2021". Only supported on + // textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + // RestrictedValues: Only get facet for the given restricted values. Only + // supported on textual fields. For example, suppose "category" has three + // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only contains + // "Action > 2022". Only supported on textual fields. Maximum is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnswerLanguageCode") 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. "CaseInsensitive") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSp -// ec: Answer Generation Model specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec struct { - // ModelVersion: Model version. If not set, it will use the default stable - // model. Allowed values are: stable, preview. - ModelVersion string `json:"modelVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "ModelVersion") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies the +// image query input. +type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, + // and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ImageBytes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ModelVersion") to include in API + // NullFields is a list of field names (e.g. "ImageBytes") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptS -// pec: Answer generation prompt specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec struct { - // Preamble: Customized preamble. - Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preamble") to - // unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandi +// ngSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // ServingConfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preamble") 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. "FilterExtractionCondition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestNaturalLanguageQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec: -// Query understanding specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec struct { - // QueryClassificationSpec: Query classification specification. - QueryClassificationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec `json:"queryClassificationSpec,omitempty"` - // QueryRephraserSpec: Query rephraser specification. - QueryRephraserSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec `json:"queryRephraserSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryClassificationSpec") to +// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion should +// occur. +type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. Default + // to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this + // case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query is + // used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this field is + // set to true, unexpanded products are always at the top of the search + // results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QueryClassificationSpec") 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. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery -// ClassificationSpec: Query classification specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec struct { - // Types: Enabled query classification types. +// GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. // // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified query classification type. - // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. - Types []string `json:"types,omitempty"` - // ForceSendFields is a list of field names (e.g. "Types") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Types") to include in API + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSearchAsYouTypeSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery -// RephraserSpec: Query rephraser specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec struct { - // Disable: Disable query rephraser. - Disable bool `json:"disable,omitempty"` - // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set - // or set to < 1, it will be set to 1 by default. - MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` - // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally +// GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Disable") to include in API + // NullFields is a list of field names (e.g. "QueryId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSessionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec: -// Related questions specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec struct { - // Enable: Enable related questions feature if true. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally +// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction replaces the original search + // query. Defaults to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, + // server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a + // suggestion is found, it is put in the SearchResponse.corrected_query. The + // spelling suggestion won't be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Enable") 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. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec +func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec: Safety -// specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec struct { - // Enable: Enable the safety filtering on the answer response. It is false by - // default. - Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally +// GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. +type GoogleCloudDiscoveryengineV1alphaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/engines/{engine + // }/sessions/*` + Name string `json:"name,omitempty"` + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,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. "Enable") to include in API + // 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 GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec +func (s GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSession return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec: Search -// specification. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec struct { - // SearchParams: Search parameters. - SearchParams *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams `json:"searchParams,omitempty"` - // SearchResultList: Search result list. - SearchResultList *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList `json:"searchResultList,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchParams") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, including a +// query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { + // Answer: The resource name of the answer to the user query. Only set if the + // answer generation (/answer API call) happened in this turn. + Answer string `json:"answer,omitempty"` + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchParams") to include in API + // NullFields is a list of field names (e.g. "Answer") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec +func (s GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams: -// Search parameters. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams struct { - // BoostSpec: Boost specification to boost certain documents in search results - // which may affect the answer query response. For more information on - // boosting, see Boosting (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // DataStoreSpecs: Specs defining dataStores to filter on in a search call and - // configurations for those dataStores. This is only considered for engines - // with multiple dataStores use case. For single dataStore within an engine, - // they should use the specs at the top level. - DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents being - // filtered. Filter expression is case-sensitive. This will be used to filter - // search results which may affect the Answer response. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI - // Search is done by mapping the LHS filter key to a key property defined in - // the Vertex AI Search backend -- this mapping is defined by the customer in - // their schema. For example a media customers might have a field 'name' in - // their schema. In this case the filter would look like this: filter --> - // name:'ANY("king kong")' For more information about filtering including - // syntax and filter operators, see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` - // MaxReturnResults: Number of search results to return. The default value is - // 10. - MaxReturnResults int64 `json:"maxReturnResults,omitempty"` - // OrderBy: The order in which documents are returned. Documents can be ordered - // by a field in an Document object. Leave it unset if ordered by relevance. - // `order_by` expression is case-sensitive. For more information on ordering, - // see Ordering (https://cloud.google.com/retail/docs/filter-and-order#order) - // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - OrderBy string `json:"orderBy,omitempty"` - // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See parse and chunk - // documents - // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) - // - // Possible values: - // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. - // "DOCUMENTS" - Returns documents in the search result. - // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. - SearchResultMode string `json:"searchResultMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.SetUriPatternDocumentData operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata 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. "BoostSpec") to include in API + // 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 GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams +func (s GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList: -// -// Search result list. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList struct { - // SearchResults: Search results. - SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult `json:"searchResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchResults") to +// GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse: Response +// message for SiteSearchEngineService.SetUriPatternDocumentData method. +type GoogleCloudDiscoveryengineV1alphaSetUriPatternDocumentDataResponse struct { +} + +// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the ownership and + // validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website that + // opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchResults") 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. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList +func (s GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResult: Search result. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult struct { - // ChunkInfo: Chunk information. - ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo `json:"chunkInfo,omitempty"` - // UnstructuredDocumentInfo: Unstructured document information. - UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkInfo") to +// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1alphaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated to + // include all pages whose address contains the provided_uri_pattern. If set to + // true, an uri_pattern is generated to try to be an exact match of the + // provided_uri_pattern or just the specific page if the provided_uri_pattern + // is a specific one. provided_uri_pattern is always normalized to generate the + // URI pattern to be used by the search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` + // GeneratedUriPattern: Output only. This is system-generated based on the + // provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be picked up + // by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to be + // deleted. This is a transitioning state which will resulted in either: 1. + // target site deleted if unindexing is successful; 2. state reverts to + // SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + // Name: Output only. The fully qualified resource name of the target site. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + // ProvidedUriPattern: Required. Input only. The user provided URI pattern from + // which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + // RootDomainUri: Output only. Root domain of the provided_uri_pattern. + RootDomainUri string `json:"rootDomainUri,omitempty"` + // SiteVerificationInfo: Output only. Site ownership and validity verification + // status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + // Type: The type of the target site, e.g., whether the site is to be included + // or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior + // defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. The target site's last updated time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExactMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkInfo") to include in API + // NullFields is a list of field names (e.g. "ExactMatch") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult +func (s GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResultChunkInfo: Chunk information. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo struct { - // Chunk: Chunk resource name. - Chunk string `json:"chunk,omitempty"` - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunk") to include in API + // NullFields is a list of field names (e.g. "QuotaFailure") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo +func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResultUnstructuredDocumentInfo: Unstructured document information. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { - // Document: Document resource name. - Document string `json:"document,omitempty"` - // DocumentContexts: List of document contexts. - DocumentContexts []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` - // ExtractiveAnswers: List of extractive answers. - ExtractiveAnswers []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` - // ExtractiveSegments: List of extractive segments. - ExtractiveSegments []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` - // Title: Title. - Title string `json:"title,omitempty"` - // Uri: URI for the document. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: Failed +// due to insufficient quota. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total quota + // this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") 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. "TotalRequiredQuota") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo +func (s GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResultUnstructuredDocumentInfoDocumentContext: Document context. -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { - // Content: Document content. - Content string `json:"content,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,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 +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata related +// to the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata 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. "Content") to include in API + // 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 GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext +func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResultUnstructuredDocumentInfoExtractiveAnswer: Extractive answer. -// Guide -// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer struct { - // Content: Extractive answer content. - Content string `json:"content,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,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 +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `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. "Content") to include in API + // 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 GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer +func (s GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS -// earchResultUnstructuredDocumentInfoExtractiveSegment: Extractive segment. -// Guide -// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) -type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { - // Content: Extractive segment content. - Content string `json:"content,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally +// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata associated +// with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection_id + // }/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Engine") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment +func (s GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryResponse: Response message for -// ConversationalSearchService.AnswerQuery method. -type GoogleCloudDiscoveryengineV1betaAnswerQueryResponse struct { - // Answer: Answer resource object. If - // AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use - // Answer.name to fetch answer information using - // ConversationalSearchService.GetAnswer API. - Answer *GoogleCloudDiscoveryengineV1betaAnswer `json:"answer,omitempty"` - // AnswerQueryToken: A global unique ID used for logging. - AnswerQueryToken string `json:"answerQueryToken,omitempty"` - // Session: Session resource object. It will be only available when session - // field is set and valid in the AnswerQueryRequest request. - Session *GoogleCloudDiscoveryengineV1betaSession `json:"session,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response associated +// with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata 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. "Answer") to include in API + // 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 GoogleCloudDiscoveryengineV1betaAnswerQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryResponse +func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo: Query -// understanding information. -type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo struct { - // QueryClassificationInfo: Query classification information. - QueryClassificationInfo []*GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo `json:"queryClassificationInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryClassificationInfo") to +// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata 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. "QueryClassificationInfo") 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. "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 GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo +func (s GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificati -// onInfo: Query classification information. -type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo struct { - // Positive: Classification output. - Positive bool `json:"positive,omitempty"` - // Type: Query classification type. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified query classification type. - // "ADVERSARIAL_QUERY" - Adversarial query classification type. - // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Positive") to +// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1alphaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must be a + // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This should not be set when using the + // client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is + // set. + UserAgent string `json:"userAgent,omitempty"` + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. Always + // use a hashed value for this ID. Don't set the field to the same fixed ID for + // different users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserId string `json:"userId,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserAgent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Positive") to include in API + // NullFields is a list of field names (e.g. "UserAgent") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo +func (s GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerReference: Reference. -type GoogleCloudDiscoveryengineV1betaAnswerReference struct { - // ChunkInfo: Chunk information. - ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo `json:"chunkInfo,omitempty"` - // UnstructuredDocumentInfo: Unstructured document information. - UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkInfo") to +// GoogleCloudDiscoveryengineV1betaAlloyDbSource: AlloyDB source import data +// from. +type GoogleCloudDiscoveryengineV1betaAlloyDbSource struct { + // ClusterId: Required. The AlloyDB cluster to copy the data from with a length + // limit of 256 characters. + ClusterId string `json:"clusterId,omitempty"` + // DatabaseId: Required. The AlloyDB database to copy the data from with a + // length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the import with + // a length limit of 2,000 characters. Can be specified if one wants to have + // the AlloyDB export to a specific Cloud Storage directory. Ensure that the + // AlloyDB service account has the necessary Cloud Storage Admin permissions to + // access the specified Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // 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 string `json:"projectId,omitempty"` + // TableId: Required. The AlloyDB table to copy the data from with a length + // limit of 256 characters. + TableId string `json:"tableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClusterId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkInfo") to include in API + // NullFields is a list of field names (e.g. "ClusterId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReference +func (s GoogleCloudDiscoveryengineV1betaAlloyDbSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAlloyDbSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo: Chunk information. -type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo struct { - // Chunk: Chunk resource name. - Chunk string `json:"chunk,omitempty"` - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - // DocumentMetadata: Document metadata. - DocumentMetadata *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` - // RelevanceScore: Relevance score. - RelevanceScore float64 `json:"relevanceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswer: Defines an answer. +type GoogleCloudDiscoveryengineV1betaAnswer struct { + // AnswerSkippedReasons: Additional answer-skipped reasons. This provides the + // reason for ignored cases. If nothing is skipped, this field is not set. + // + // Possible values: + // "ANSWER_SKIPPED_REASON_UNSPECIFIED" - Default value. The answer skipped + // reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query ignored + // case. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. + // Google skips the answer if there are no high-relevance search results. + // "POTENTIAL_POLICY_VIOLATION" - 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. + // "NO_RELEVANT_CONTENT" - The no relevant content case. Google skips the + // answer if there is no relevant content in the retrieved search results. + AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` + // AnswerText: The textual answer. + AnswerText string `json:"answerText,omitempty"` + // Citations: Citations. + Citations []*GoogleCloudDiscoveryengineV1betaAnswerCitation `json:"citations,omitempty"` + // CompleteTime: Output only. Answer completed timestamp. + CompleteTime string `json:"completeTime,omitempty"` + // CreateTime: Output only. Answer creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/engines/{engine + // }/sessions/*/answers/*` + Name string `json:"name,omitempty"` + // QueryUnderstandingInfo: Query understanding information. + QueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo `json:"queryUnderstandingInfo,omitempty"` + // References: References. + References []*GoogleCloudDiscoveryengineV1betaAnswerReference `json:"references,omitempty"` + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + // State: The state of the answer generation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Answer generation is currently in progress. + // "FAILED" - Answer generation currently failed. + // "SUCCEEDED" - Answer generation has succeeded. + State string `json:"state,omitempty"` + // Steps: Answer generation steps. + Steps []*GoogleCloudDiscoveryengineV1betaAnswerStep `json:"steps,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AnswerSkippedReasons") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunk") 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. "AnswerSkippedReasons") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo +func (s GoogleCloudDiscoveryengineV1betaAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswer return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo - var s1 struct { - RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.RelevanceScore = float64(s1.RelevanceScore) - return nil -} - -// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata: -// Document metadata. -type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata struct { - // Document: Document resource name. - Document string `json:"document,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,omitempty"` - // StructData: The structured JSON metadata for the document. It is populated - // from the struct data from the Chunk in search result. - StructData googleapi.RawMessage `json:"structData,omitempty"` - // Title: Title. - Title string `json:"title,omitempty"` - // Uri: URI for the document. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to +// GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a segment. +type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Index indicates the start of the segment, measured in bytes + // (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in API + // NullFields is a list of field names (e.g. "EndIndex") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata +func (s GoogleCloudDiscoveryengineV1betaAnswerCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo: -// Unstructured document information. -type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo struct { - // ChunkContents: List of cited chunk contents derived from document content. - ChunkContents []*GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` - // Document: Document resource name. - Document string `json:"document,omitempty"` - // StructData: The structured JSON metadata for the document. It is populated - // from the struct data from the Chunk in search result. - StructData googleapi.RawMessage `json:"structData,omitempty"` - // Title: Title. - Title string `json:"title,omitempty"` - // Uri: URI for the document. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkContents") to +// GoogleCloudDiscoveryengineV1betaAnswerCitationSource: Citation source. +type GoogleCloudDiscoveryengineV1betaAnswerCitationSource struct { + // ReferenceId: ID of the citation source. + ReferenceId string `json:"referenceId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReferenceId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkContents") to include in API + // NullFields is a list of field names (e.g. "ReferenceId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo +func (s GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitationSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkC -// ontent: Chunk content. -type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent struct { - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,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 +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequest: Request message for +// ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { + // AnswerGenerationSpec: Answer generation specification. + AnswerGenerationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` + // AsynchronousMode: Asynchronous mode control. If enabled, the response will + // be returned with answer/session resource name without final answer. The API + // users need to do the polling to get the latest status of answer/session by + // calling ConversationalSearchService.GetAnswer or + // ConversationalSearchService.GetSession method. + AsynchronousMode bool `json:"asynchronousMode,omitempty"` + // Query: Required. Current user query. + Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` + // QueryUnderstandingSpec: Query understanding specification. + QueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec `json:"queryUnderstandingSpec,omitempty"` + // RelatedQuestionsSpec: Related questions specification. + RelatedQuestionsSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec `json:"relatedQuestionsSpec,omitempty"` + // SafetySpec: Model specification. + SafetySpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec `json:"safetySpec,omitempty"` + // SearchSpec: Search specification. + SearchSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec `json:"searchSpec,omitempty"` + // Session: The session resource name. Not required. When session field is not + // set, the API is in sessionless mode. We support auto session mode: users can + // use the wildcard symbol `-` as session ID. A new ID will be automatically + // generated and assigned. + Session string `json:"session,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. The field must be a UTF-8 + // encoded string with a length limit of 128 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerGenerationSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "AnswerGenerationSpec") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerStep: Step information. -type GoogleCloudDiscoveryengineV1betaAnswerStep struct { - // Actions: Actions. - Actions []*GoogleCloudDiscoveryengineV1betaAnswerStepAction `json:"actions,omitempty"` - // Description: The description of the step. - Description string `json:"description,omitempty"` - // State: The state of the step. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unknown. - // "IN_PROGRESS" - Step is currently in progress. - // "FAILED" - Step currently failed. - // "SUCCEEDED" - Step has succeeded. - State string `json:"state,omitempty"` - // Thought: The thought of the step. - Thought string `json:"thought,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 +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec: +// Answer generation specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec struct { + // AnswerLanguageCode: Language code for Answer. Use language tags defined by + // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + AnswerLanguageCode string `json:"answerLanguageCode,omitempty"` + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No answer is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating answers for adversarial queries and return fallback messages + // instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. If this field is set to `false`, all search results are used + // regardless of relevance to generate answers. If set to `true` or unset, the + // behavior will be determined automatically by the service. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` + // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries that + // are not answer-seeking. The default value is `false`. Google employs + // search-query classification to detect answer-seeking queries. No answer is + // returned if the search query is classified as a non-answer seeking query. If + // this field is set to `true`, we skip generating answers for non-answer + // seeking queries and return fallback messages instead. + IgnoreNonAnswerSeekingQuery bool `json:"ignoreNonAnswerSeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citation metadata in the + // answer. The default value is `false`. + IncludeCitations bool `json:"includeCitations,omitempty"` + // ModelSpec: Answer generation model specification. + ModelSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec `json:"modelSpec,omitempty"` + // PromptSpec: Answer generation prompt specification. + PromptSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec `json:"promptSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnswerLanguageCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "AnswerLanguageCode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStep) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStep +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerStepAction: Action. -type GoogleCloudDiscoveryengineV1betaAnswerStepAction struct { - // Observation: Observation. - Observation *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation `json:"observation,omitempty"` - // SearchAction: Search action. - SearchAction *GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction `json:"searchAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "Observation") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSp +// ec: Answer Generation Model specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec struct { + // ModelVersion: Model version. If not set, it will use the default stable + // model. Allowed values are: stable, preview. + ModelVersion string `json:"modelVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelVersion") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Observation") to include in API + // NullFields is a list of field names (e.g. "ModelVersion") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepAction +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation: Observation. -type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation struct { - // SearchResults: Search results observed by the search action, it can be - // snippets info or chunk info, depending on the citation type set by the user. - SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult `json:"searchResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchResults") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptS +// pec: Answer generation prompt specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec struct { + // Preamble: Customized preamble. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchResults") to include in API + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult struct { - // ChunkInfo: If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, - // populate chunk info. - ChunkInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo `json:"chunkInfo,omitempty"` - // Document: Document resource name. - Document string `json:"document,omitempty"` - // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document - // level snippets. - SnippetInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` - // StructData: Data representation. The structured JSON data for the document. - // It's populated from the struct data from the Document (code pointer: - // http://shortn/_objzAfIiHq), or the Chunk in search result (code pointer: - // http://shortn/_Ipo6KFFGBL). - StructData googleapi.RawMessage `json:"structData,omitempty"` - // Title: Title. - Title string `json:"title,omitempty"` - // Uri: URI for the document. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkInfo") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec: +// Query understanding specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec struct { + // QueryClassificationSpec: Query classification specification. + QueryClassificationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec `json:"queryClassificationSpec,omitempty"` + // QueryRephraserSpec: Query rephraser specification. + QueryRephraserSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec `json:"queryRephraserSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryClassificationSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkInfo") 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. "QueryClassificationSpec") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkI -// nfo: Chunk information. -type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo struct { - // Chunk: Chunk resource name. - Chunk string `json:"chunk,omitempty"` - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - // RelevanceScore: Relevance score. - RelevanceScore float64 `json:"relevanceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery +// ClassificationSpec: Query classification specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec struct { + // Types: Enabled query classification types. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + Types []string `json:"types,omitempty"` + // ForceSendFields is a list of field names (e.g. "Types") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunk") to include in API + // NullFields is a list of field names (e.g. "Types") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo - var s1 struct { - RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.RelevanceScore = float64(s1.RelevanceScore) - return nil -} - -// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippe -// tInfo: Snippet information. -type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo struct { - // Snippet: Snippet content. - Snippet string `json:"snippet,omitempty"` - // SnippetStatus: Status of the snippet defined by the search team. - SnippetStatus string `json:"snippetStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "Snippet") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery +// RephraserSpec: Query rephraser specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec struct { + // Disable: Disable query rephraser. + Disable bool `json:"disable,omitempty"` + // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set + // or set to < 1, it will be set to 1 by default. + MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` + // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Snippet") to include in API + // NullFields is a list of field names (e.g. "Disable") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction: Search action. -type GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction struct { - // Query: The query to search. - Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "Query") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec: +// Related questions specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec struct { + // Enable: Enable related questions feature if true. + Enable bool `json:"enable,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Query") to include in API + // NullFields is a list of field names (e.g. "Enable") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec 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"` - // 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 +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec: Safety +// specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec struct { + // Enable: Enable the safety filtering on the answer response. It is false by + // default. + Enable bool `json:"enable,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enable") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Enable") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest: Request -// message for SiteSearchEngineService.BatchCreateTargetSites method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { - // Requests: Required. The request message specifying the resources to create. - // A maximum of 20 TargetSites can be created in a batch. - Requests []*GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "Requests") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec: Search +// specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec struct { + // SearchParams: Search parameters. + SearchParams *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams `json:"searchParams,omitempty"` + // SearchResultList: Search result list. + SearchResultList *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList `json:"searchResultList,omitempty"` + // ForceSendFields is a list of field names (e.g. "SearchParams") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in API + // NullFields is a list of field names (e.g. "SearchParams") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: Response -// message for SiteSearchEngineService.BatchCreateTargetSites method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetSites") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams: +// Search parameters. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams struct { + // BoostSpec: Boost specification to boost certain documents in search results + // which may affect the answer query response. For more information on + // boosting, see Boosting (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. This will be used to filter + // search results which may affect the Answer response. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customers might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // MaxReturnResults: Number of search results to return. The default value is + // 10. + MaxReturnResults int64 `json:"maxReturnResults,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering, + // see Ordering (https://cloud.google.com/retail/docs/filter-and-order#order) + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. See parse and chunk documents + // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSites") to include in API + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: Request -// message for SiteSearchEngineService.BatchVerifyTargetSites method. -type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaBigQuerySource: BigQuery source import data -// from. -type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for user event imports: * `user_event` (default): One - // UserEvent per row. Supported values for document imports: * `document` - // (default): One Document format per row. Each document must have a valid - // Document.id and one of Document.json_data or Document.struct_data. * - // `custom`: One custom data per row in arbitrary format that conforms to the - // defined Schema of the data store. This can only be used by the GENERIC Data - // Store vertical. - DataSchema string `json:"dataSchema,omitempty"` - // DatasetId: Required. The BigQuery data set to copy the data from with a - // length limit of 1,024 characters. - DatasetId string `json:"datasetId,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the import with - // a length limit of 2,000 characters. Can be specified if one wants to have - // the BigQuery export to a specific Cloud Storage directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // 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 - // project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` - // TableId: Required. The BigQuery table to copy the data from with a length - // limit of 1,024 characters. - TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList: +// +// Search result list. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList struct { + // SearchResults: Search results. + SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult `json:"searchResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "SearchResults") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSchema") to include in API + // NullFields is a list of field names (e.g. "SearchResults") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBigQuerySource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigQuerySource +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableOptions: The Bigtable Options object -// that contains information to support the import. -type GoogleCloudDiscoveryengineV1betaBigtableOptions struct { - // Families: The mapping from family names to an object that contains column - // families level information for the given column family. If a family is not - // present in this map it will be ignored. - Families map[string]GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` - // KeyFieldName: The field name used for saving row key value in the document. - // The name has to match the pattern `a-zA-Z0-9*`. - KeyFieldName string `json:"keyFieldName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Families") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResult: Search result. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo `json:"chunkInfo,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Families") to include in API + // NullFields is a list of field names (e.g. "ChunkInfo") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBigtableOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptions +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn: The column of -// the Bigtable. -type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn struct { - // Encoding: The encoding mode of the values when the type is not `STRING`. - // Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric - // text strings. * `BINARY`: indicates values are encoded using `HBase - // Bytes.toBytes` family of functions. This can be overridden for a specific - // column by listing that column in `columns` and specifying an encoding for - // it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - The encoding is unspecified. - // "TEXT" - Text encoding. - // "BINARY" - Binary encoding. - Encoding string `json:"encoding,omitempty"` - // FieldName: The field name to use for this column in the document. The name - // has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the - // qualifier bytes with best effort. However, due to different naming patterns, - // field name collisions could happen, where parsing behavior is undefined. - FieldName string `json:"fieldName,omitempty"` - // Qualifier: Required. Qualifier of the column. If it cannot be decoded with - // utf-8, use a base-64 encoded string instead. - Qualifier string `json:"qualifier,omitempty"` - // Type: The type of values in this column family. The values are expected to - // be encoded using `HBase Bytes.toBytes` function when the encoding value is - // set to `BINARY`. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The type is unspecified. - // "STRING" - String type. - // "NUMBER" - Numerical type. - // "INTEGER" - Integer type. - // "VAR_INTEGER" - Variable length integer type. - // "BIG_NUMERIC" - BigDecimal type. - // "BOOLEAN" - Boolean type. - // "JSON" - JSON type. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Encoding") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Encoding") to include in API + // NullFields is a list of field names (e.g. "Chunk") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily: The -// column family of the Bigtable. -type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct { - // Columns: The list of objects that contains column level information for each - // column. If a column is not present in this list it will be ignored. - Columns []*GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn `json:"columns,omitempty"` - // Encoding: The encoding mode of the values when the type is not STRING. - // Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric - // text strings. * `BINARY`: indicates values are encoded using `HBase - // Bytes.toBytes` family of functions. This can be overridden for a specific - // column by listing that column in `columns` and specifying an encoding for - // it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - The encoding is unspecified. - // "TEXT" - Text encoding. - // "BINARY" - Binary encoding. - Encoding string `json:"encoding,omitempty"` - // FieldName: The field name to use for this column family in the document. The - // name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from - // the family name with best effort. However, due to different naming patterns, - // field name collisions could happen, where parsing behavior is undefined. - FieldName string `json:"fieldName,omitempty"` - // Type: The type of values in this column family. The values are expected to - // be encoded using `HBase Bytes.toBytes` function when the encoding value is - // set to `BINARY`. - // - // Possible values: - // "TYPE_UNSPECIFIED" - The type is unspecified. - // "STRING" - String type. - // "NUMBER" - Numerical type. - // "INTEGER" - Integer type. - // "VAR_INTEGER" - Variable length integer type. - // "BIG_NUMERIC" - BigDecimal type. - // "BOOLEAN" - Boolean type. - // "JSON" - JSON type. - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultUnstructuredDocumentInfo: Unstructured document information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` + // DocumentContexts: List of document contexts. + DocumentContexts []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` + // ExtractiveAnswers: List of extractive answers. + ExtractiveAnswers []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` + // ExtractiveSegments: List of extractive segments. + ExtractiveSegments []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` + // Title: Title. + Title string `json:"title,omitempty"` + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Document") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultUnstructuredDocumentInfoDocumentContext: Document context. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { + // Content: Document content. + Content string `json:"content,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,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. "Columns") to include in API + // 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 GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableSource: The Cloud Bigtable source -// for importing data. -type GoogleCloudDiscoveryengineV1betaBigtableSource struct { - // BigtableOptions: Required. Bigtable options that contains information needed - // when parsing data into typed structures. For example, column type - // annotations. - BigtableOptions *GoogleCloudDiscoveryengineV1betaBigtableOptions `json:"bigtableOptions,omitempty"` - // 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 string `json:"projectId,omitempty"` - // TableId: Required. The table ID of the Cloud Bigtable that needs to be - // imported. - TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigtableOptions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultUnstructuredDocumentInfoExtractiveAnswer: Extractive answer. +// Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer struct { + // Content: Extractive answer content. + Content string `json:"content,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,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. "BigtableOptions") 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. "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 GoogleCloudDiscoveryengineV1betaBigtableSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableSource +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCheckGroundingRequest: Request message for -// GroundedGenerationService.CheckGrounding method. -type GoogleCloudDiscoveryengineV1betaCheckGroundingRequest struct { - // AnswerCandidate: Answer candidate to check. Can have a maximum length of - // 1024 characters. - AnswerCandidate string `json:"answerCandidate,omitempty"` - // Facts: List of facts for the grounding check. We support up to 200 facts. - Facts []*GoogleCloudDiscoveryengineV1betaGroundingFact `json:"facts,omitempty"` - // GroundingSpec: Configuration of the grounding check. - GroundingSpec *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec `json:"groundingSpec,omitempty"` - // UserLabels: The user labels applied to a resource must meet the following - // requirements: * Each resource can have multiple labels, up to a maximum of - // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 - // character and a maximum length of 63 characters and cannot be empty. Values - // can be empty and have a maximum length of 63 characters. * Keys and values - // can contain only lowercase letters, numeric characters, underscores, and - // dashes. All characters must use UTF-8 encoding, and international characters - // are allowed. * The key portion of a label must be unique. However, you can - // use the same key with multiple resources. * Keys must start with a lowercase - // letter or international character. See Google Cloud Document - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnswerCandidate") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListS +// earchResultUnstructuredDocumentInfoExtractiveSegment: Extractive segment. +// Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { + // Content: Extractive segment content. + Content string `json:"content,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,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. "AnswerCandidate") 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. "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 GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingRequest +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCheckGroundingResponse: Response message for -// the GroundedGenerationService.CheckGrounding method. -type GoogleCloudDiscoveryengineV1betaCheckGroundingResponse struct { - // CitedChunks: List of facts cited across all claims in the answer candidate. - // These are derived from the facts supplied in the request. - CitedChunks []*GoogleCloudDiscoveryengineV1betaFactChunk `json:"citedChunks,omitempty"` - // Claims: Claim texts and citation info across all claims in the answer - // candidate. - Claims []*GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim `json:"claims,omitempty"` - // SupportScore: The support score for the input answer candidate. Higher the - // score, higher is the fraction of claims that are supported by the provided - // facts. This is always set when a response is returned. - SupportScore float64 `json:"supportScore,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryResponse: Response message for +// ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1betaAnswerQueryResponse struct { + // Answer: Answer resource object. If + // AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_ste + // ps is greater than 1, use Answer.name to fetch answer information using + // ConversationalSearchService.GetAnswer API. + Answer *GoogleCloudDiscoveryengineV1betaAnswer `json:"answer,omitempty"` + // AnswerQueryToken: A global unique ID used for logging. + AnswerQueryToken string `json:"answerQueryToken,omitempty"` + // Session: Session resource object. It will be only available when session + // field is set and valid in the AnswerQueryRequest request. + Session *GoogleCloudDiscoveryengineV1betaSession `json:"session,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CitedChunks") 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. "Answer") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitedChunks") to include in API + // NullFields is a list of field names (e.g. "Answer") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse - var s1 struct { - SupportScore gensupport.JSONFloat64 `json:"supportScore"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.SupportScore = float64(s1.SupportScore) - return nil -} - -// GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim: Text and -// citation info for a claim in the answer candidate. -type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { - // CitationIndices: A list of indices (into 'cited_chunks') specifying the - // citations associated with the claim. For instance [1,3,4] means that - // cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited - // supporting for the claim. A citation to a fact indicates that the claim is - // supported by the fact. - CitationIndices []int64 `json:"citationIndices,omitempty"` - // ClaimText: Text for the claim in the answer candidate. Always provided - // regardless of whether citations or anti-citations are found. - ClaimText string `json:"claimText,omitempty"` - // EndPos: Position indicating the end of the claim in the answer candidate, - // exclusive. - EndPos int64 `json:"endPos,omitempty"` - // GroundingCheckRequired: 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. - GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` - // StartPos: Position indicating the start of the claim in the answer - // candidate, measured in bytes. - StartPos int64 `json:"startPos,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationIndices") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo: Query +// understanding information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo struct { + // QueryClassificationInfo: Query classification information. + QueryClassificationInfo []*GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo `json:"queryClassificationInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryClassificationInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitationIndices") 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. "QueryClassificationInfo") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCheckGroundingSpec: Specification for the -// grounding check. -type GoogleCloudDiscoveryengineV1betaCheckGroundingSpec struct { - // CitationThreshold: The threshold (in [0,1]) used for determining whether a - // fact must be cited for a claim in the answer candidate. Choosing a higher - // threshold will lead to fewer but very strong citations, while choosing a - // lower threshold may lead to more but somewhat weaker citations. If unset, - // the threshold will default to 0.6. - CitationThreshold float64 `json:"citationThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationThreshold") to +// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificati +// onInfo: Query classification information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo struct { + // Positive: Classification output. + Positive bool `json:"positive,omitempty"` + // Type: Query classification type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query classification type. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitationThreshold") 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. "Positive") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec - var s1 struct { - CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.CitationThreshold = float64(s1.CitationThreshold) - return nil +// GoogleCloudDiscoveryengineV1betaAnswerReference: Reference. +type GoogleCloudDiscoveryengineV1betaAnswerReference struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo `json:"chunkInfo,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkInfo") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleCloudDiscoveryengineV1betaChunk: Chunk captures all raw metadata -// information of items to be recommended or searched in the chunk mode. -type GoogleCloudDiscoveryengineV1betaChunk struct { - // ChunkMetadata: Output only. Metadata of the current chunk. - ChunkMetadata *GoogleCloudDiscoveryengineV1betaChunkChunkMetadata `json:"chunkMetadata,omitempty"` - // Content: Content is a string from a document (parsed content). +func (s GoogleCloudDiscoveryengineV1betaAnswerReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` + // Content: Chunk textual content. Content string `json:"content,omitempty"` - // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains - // derived data that are not in the original input document. - DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` - // DocumentMetadata: Metadata of the document from the current chunk. - DocumentMetadata *GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata `json:"documentMetadata,omitempty"` - // Id: Unique chunk ID of the current chunk. - Id string `json:"id,omitempty"` - // Name: The full resource name of the chunk. Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. - // This field must be a UTF-8 encoded string with a length limit of 1024 - // characters. - Name string `json:"name,omitempty"` - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDiscoveryengineV1betaChunkPageSpan `json:"pageSpan,omitempty"` - // RelevanceScore: Output only. Represents the relevance score based on - // similarity. Higher score indicates higher chunk relevance. The score is in - // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + // DocumentMetadata: Document metadata. + DocumentMetadata *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` + // RelevanceScore: Relevance score. RelevanceScore float64 `json:"relevanceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkMetadata") 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. "Chunk") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkMetadata") to include in API + // NullFields is a list of field names (e.g. "Chunk") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaChunk +func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaChunk) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaChunk +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo var s1 struct { RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` *NoMethod @@ -8102,692 +8835,609 @@ func (s *GoogleCloudDiscoveryengineV1betaChunk) UnmarshalJSON(data []byte) error return nil } -// GoogleCloudDiscoveryengineV1betaChunkChunkMetadata: Metadata of the current -// chunk. This field is only populated on SearchService.Search API. -type GoogleCloudDiscoveryengineV1betaChunkChunkMetadata struct { - // NextChunks: The next chunks of the current chunk. The number is controlled - // by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is - // only populated on SearchService.Search API. - NextChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"nextChunks,omitempty"` - // PreviousChunks: The previous chunks of the current chunk. The number is - // controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. - // This field is only populated on SearchService.Search API. - PreviousChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"previousChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextChunks") to +// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata: +// Document metadata. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Title. + Title string `json:"title,omitempty"` + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextChunks") to include in API + // NullFields is a list of field names (e.g. "Document") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaChunkChunkMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaChunkChunkMetadata +func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata: Document metadata -// contains the information of the document of the current chunk. -type GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata struct { - // StructData: Data representation. The structured JSON data for the document. - // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is - // thrown. +// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo: +// Unstructured document information. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo struct { + // ChunkContents: List of cited chunk contents derived from document content. + ChunkContents []*GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` + // Document: Document resource name. + Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. StructData googleapi.RawMessage `json:"structData,omitempty"` - // Title: Title of the document. + // Title: Title. Title string `json:"title,omitempty"` - // Uri: Uri of the document. + // Uri: URI for the document. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "StructData") to + // ForceSendFields is a list of field names (e.g. "ChunkContents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "StructData") to include in API + // NullFields is a list of field names (e.g. "ChunkContents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata +func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaChunkPageSpan: Page span of the chunk. -type GoogleCloudDiscoveryengineV1betaChunkPageSpan struct { - // PageEnd: The end page of the chunk. - PageEnd int64 `json:"pageEnd,omitempty"` - // PageStart: The start page of the chunk. - PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkC +// ontent: Chunk content. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,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. "PageEnd") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaChunkPageSpan - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaCloudSqlSource: Cloud SQL source import data -// from. -type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { - // DatabaseId: Required. The Cloud SQL database to copy the data from with a - // length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the import with - // a length limit of 2,000 characters. Can be specified if one wants to have - // the Cloud SQL export to a specific Cloud Storage directory. Ensure that the - // Cloud SQL service account has the necessary Cloud Storage Admin permissions - // to access the specified Cloud Storage directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // InstanceId: Required. The Cloud SQL instance to copy the data from with a - // length limit of 256 characters. - InstanceId string `json:"instanceId,omitempty"` - // Offload: Option for serverless export. Enabling this option will incur - // 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 - // limit of 128 characters. If not specified, inherits the project ID from the - // parent request. - ProjectId string `json:"projectId,omitempty"` - // TableId: Required. The Cloud SQL table to copy the data from with a length - // limit of 256 characters. - TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in API + // 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 GoogleCloudDiscoveryengineV1betaCloudSqlSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCloudSqlSource +func (s GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompleteQueryResponse: Response message for -// CompletionService.CompleteQuery method. -type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { - // QuerySuggestions: Results of the matched query suggestions. The result list - // is ordered and the first result is a top suggestion. - QuerySuggestions []*GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` - // TailMatchTriggered: True if the returned suggestions are all tail - // suggestions. For tail matching to be triggered, include_tail_suggestions in - // the request must be true and there must be no suggestions that match the - // full query. - TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStep: Step information. +type GoogleCloudDiscoveryengineV1betaAnswerStep struct { + // Actions: Actions. + Actions []*GoogleCloudDiscoveryengineV1betaAnswerStepAction `json:"actions,omitempty"` + // Description: The description of the step. + Description string `json:"description,omitempty"` + // State: The state of the step. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Step is currently in progress. + // "FAILED" - Step currently failed. + // "SUCCEEDED" - Step has succeeded. + State string `json:"state,omitempty"` + // Thought: The thought of the step. + Thought string `json:"thought,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:"-"` +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to +func (s GoogleCloudDiscoveryengineV1betaAnswerStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStep + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAnswerStepAction: Action. +type GoogleCloudDiscoveryengineV1betaAnswerStepAction struct { + // Observation: Observation. + Observation *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation `json:"observation,omitempty"` + // SearchAction: Search action. + SearchAction *GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction `json:"searchAction,omitempty"` + // ForceSendFields is a list of field names (e.g. "Observation") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuerySuggestions") 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. "Observation") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCompleteQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponse +func (s GoogleCloudDiscoveryengineV1betaAnswerStepAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion: -// Suggestions as search queries. -type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct { - // CompletableFieldPaths: The unique document field paths that serve as the - // source of this suggestion if it was generated from completable fields. This - // field is only populated for the document-completable model. - CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` - // Suggestion: The suggestion for the query. - Suggestion string `json:"suggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompletableFieldPaths") to +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation: Observation. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation struct { + // SearchResults: Search results observed by the search action, it can be + // snippets info or chunk info, depending on the citation type set by the user. + SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult `json:"searchResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "SearchResults") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletableFieldPaths") 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. "SearchResults") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion +func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompletionInfo: Detailed completion -// information including completion attribution token and clicked completion -// info. -type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { - // SelectedPosition: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. - SelectedPosition int64 `json:"selectedPosition,omitempty"` - // SelectedSuggestion: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion. - SelectedSuggestion string `json:"selectedSuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "SelectedPosition") to +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult struct { + // ChunkInfo: If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, + // populate chunk info. + ChunkInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo `json:"chunkInfo,omitempty"` + // Document: Document resource name. + Document string `json:"document,omitempty"` + // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate document + // level snippets. + SnippetInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + // StructData: Data representation. The structured JSON data for the document. + // It's populated from the struct data from the Document , or the Chunk in + // search result . + StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Title. + Title string `json:"title,omitempty"` + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SelectedPosition") 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. "ChunkInfo") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompletionInfo +func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompletionSuggestion: Autocomplete -// suggestions that are imported from Customer. -type GoogleCloudDiscoveryengineV1betaCompletionSuggestion struct { - // AlternativePhrases: Alternative matching phrases for this suggestion. - AlternativePhrases []string `json:"alternativePhrases,omitempty"` - // Frequency: Frequency of this suggestion. Will be used to rank suggestions - // when score is not available. - Frequency int64 `json:"frequency,omitempty,string"` - // GlobalScore: Global score of this suggestion. Control how this suggestion - // would be scored / ranked. - GlobalScore float64 `json:"globalScore,omitempty"` - // GroupId: If two suggestions have the same groupId, they will not be returned - // together. Instead the one ranked higher will be returned. This can be used - // to deduplicate semantically identical suggestions. - GroupId string `json:"groupId,omitempty"` - // GroupScore: The score of this suggestion within its group. - GroupScore float64 `json:"groupScore,omitempty"` - // LanguageCode: BCP-47 language code of this suggestion. - LanguageCode string `json:"languageCode,omitempty"` - // Suggestion: Required. The suggestion text. - Suggestion string `json:"suggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AlternativePhrases") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkI +// nfo: Chunk information. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AlternativePhrases") 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. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCompletionSuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompletionSuggestion +func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaCompletionSuggestion) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaCompletionSuggestion +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo var s1 struct { - GlobalScore gensupport.JSONFloat64 `json:"globalScore"` - GroupScore gensupport.JSONFloat64 `json:"groupScore"` + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.GlobalScore = float64(s1.GlobalScore) - s.GroupScore = float64(s1.GroupScore) + s.RelevanceScore = float64(s1.RelevanceScore) return nil } -// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be -// checked before allowing a behavior -type GoogleCloudDiscoveryengineV1betaCondition struct { - // ActiveTimeRange: Range of time(s) specifying when condition is active. - // Maximum of 10 time ranges. - ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` - // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 - // query terms. - QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCondition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search -// request query -type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { - // FullMatch: Whether the search query needs to exactly match the query term. - FullMatch bool `json:"fullMatch,omitempty"` - // Value: The specific query value to match against Must be lowercase, must be - // UTF-8. Can have at most 3 space separated terms if full_match is true. - // Cannot be an empty string. Maximum length of 5000 characters. - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "FullMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippe +// tInfo: Snippet information. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo struct { + // Snippet: Snippet content. + Snippet string `json:"snippet,omitempty"` + // SnippetStatus: Status of the snippet defined by the search team. + SnippetStatus string `json:"snippetStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "Snippet") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FullMatch") to include in API + // NullFields is a list of field names (e.g. "Snippet") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm +func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent -// conditions. -type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { - // EndTime: End of time range. Range is inclusive. Must be in the future. - EndTime string `json:"endTime,omitempty"` - // StartTime: Start of time range. Range is inclusive. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally +// GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction: Search action. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction struct { + // Query: The query to search. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Query") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange +func (s GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to -// 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 - // 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 - BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` - // Conditions: Determines when the associated action will trigger. Omit to - // always apply the action. Currently only a single condition may be specified. - // Otherwise an INVALID ARGUMENT error is thrown. - Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` - // DisplayName: Required. Human readable name. The identifier used in UI views. - // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an - // INVALID ARGUMENT error is thrown. - DisplayName string `json:"displayName,omitempty"` - // FilterAction: Defines a filter-type control Currently not supported by - // Recommendation - FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/*/locations/global/dataStore/*/controls/*` - Name string `json:"name,omitempty"` - // RedirectAction: Defines a redirect-type control. - RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` - // SolutionType: Required. Immutable. What solution the control belongs to. - // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT - // error is thrown. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionType string `json:"solutionType,omitempty"` - // SynonymsAction: Treats a group of terms as synonyms of one another. - SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` - // UseCases: Specifies the use case for the control. Affects what condition - // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only - // allow one use case per control. Must be set when solution_type is - // SolutionType.SOLUTION_TYPE_SEARCH. - // - // Possible values: - // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in - // CSS. - // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a - // non-empty query. - // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an - // empty query. - UseCases []string `json:"useCases,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") - // to unconditionally include in API requests. By default, fields with empty or +// 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"` + // 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. "AssociatedServingConfigIds") 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. "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 GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControl +func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of -// products in returned list. -type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { - // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative - // boost means demotion. Default is 0.0 (No-op). - Boost float64 `json:"boost,omitempty"` - // DataStore: Required. Specifies which data store's documents can be boosted - // by this control. Full data store name e.g. - // projects/123/locations/global/collections/default_collection/dataStores/defau - // lt_data_store - DataStore string `json:"dataStore,omitempty"` - // Filter: Required. Specifies which products to apply the boost to. If no - // filter is provided all products will be boosted (No-op). Syntax - // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum - // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest: Request +// message for SiteSearchEngineService.BatchCreateTargetSites method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { + // Requests: Required. The request message specifying the resources to create. + // A maximum of 20 TargetSites can be created in a batch. + Requests []*GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest `json:"requests,omitempty"` + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Boost") to include in API + // NullFields is a list of field names (e.g. "Requests") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction +func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} - -// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which -// products may be included in results. Uses same filter as boost. -type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { - // DataStore: Required. Specifies which data store's documents can be filtered - // by this control. Full data store name e.g. - // projects/123/locations/global/collections/default_collection/dataStores/defau - // lt_data_store - DataStore string `json:"dataStore,omitempty"` - // Filter: Required. A filter to apply on the matching condition results. - // Required Syntax documentation: - // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 - // characters. Otherwise an INVALID ARGUMENT error is thrown. - Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: Response +// message for SiteSearchEngineService.BatchCreateTargetSites method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` + // ForceSendFields is a list of field names (e.g. "TargetSites") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // NullFields is a list of field names (e.g. "TargetSites") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction +func (s GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper -// to the provided URI. -type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { - // RedirectUri: Required. The URI to which the shopper will be redirected. - // Required. URI must have length equal or less than 2000 characters. Otherwise - // an INVALID ARGUMENT error is thrown. - RedirectUri string `json:"redirectUri,omitempty"` - // ForceSendFields is a list of field names (e.g. "RedirectUri") to +// GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: Request +// message for SiteSearchEngineService.BatchVerifyTargetSites method. +type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaBigQuerySource: BigQuery source import data +// from. +type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for user event imports: * `user_event` (default): One + // UserEvent per row. Supported values for document imports: * `document` + // (default): One Document format per row. Each document must have a valid + // Document.id and one of Document.json_data or Document.struct_data. * + // `custom`: One custom data per row in arbitrary format that conforms to the + // defined Schema of the data store. This can only be used by the GENERIC Data + // Store vertical. + DataSchema string `json:"dataSchema,omitempty"` + // DatasetId: Required. The BigQuery data set to copy the data from with a + // length limit of 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the import with + // a length limit of 2,000 characters. Can be specified if one wants to have + // the BigQuery export to a specific Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // 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 + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + // TableId: Required. The BigQuery table to copy the data from with a length + // limit of 1,024 characters. + TableId string `json:"tableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataSchema") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // NullFields is a list of field names (e.g. "DataSchema") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction +func (s GoogleCloudDiscoveryengineV1betaBigQuerySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigQuerySource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of -// terms that will act as synonyms of one another. Example: "happy" will also -// be considered as "glad", "glad" will also be considered as "happy". -type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { - // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must - // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. - Synonyms []string `json:"synonyms,omitempty"` - // ForceSendFields is a list of field names (e.g. "Synonyms") to +// GoogleCloudDiscoveryengineV1betaBigtableOptions: The Bigtable Options object +// that contains information to support the import. +type GoogleCloudDiscoveryengineV1betaBigtableOptions struct { + // Families: The mapping from family names to an object that contains column + // families level information for the given column family. If a family is not + // present in this map it will be ignored. + Families map[string]GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` + // KeyFieldName: The field name used for saving row key value in the document. + // The name has to match the pattern `a-zA-Z0-9*`. + KeyFieldName string `json:"keyFieldName,omitempty"` + // ForceSendFields is a list of field names (e.g. "Families") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Synonyms") to include in API + // NullFields is a list of field names (e.g. "Families") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction +func (s GoogleCloudDiscoveryengineV1betaBigtableOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptions return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversation: External conversation proto -// definition. -type GoogleCloudDiscoveryengineV1betaConversation struct { - // EndTime: Output only. The time the conversation finished. - EndTime string `json:"endTime,omitempty"` - // Messages: Conversation messages. - Messages []*GoogleCloudDiscoveryengineV1betaConversationMessage `json:"messages,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/dataStore/*/con - // versations/*` or - // `projects/{project}/locations/global/collections/{collection}/engines/*/conve - // rsations/*`. - Name string `json:"name,omitempty"` - // StartTime: Output only. The time the conversation started. - StartTime string `json:"startTime,omitempty"` - // State: The state of the Conversation. +// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn: The column of +// the Bigtable. +type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn struct { + // Encoding: The encoding mode of the values when the type is not `STRING`. + // Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric + // text strings. * `BINARY`: indicates values are encoded using `HBase + // Bytes.toBytes` family of functions. This can be overridden for a specific + // column by listing that column in `columns` and specifying an encoding for + // it. // // Possible values: - // "STATE_UNSPECIFIED" - Unknown. - // "IN_PROGRESS" - Conversation is currently open. - // "COMPLETED" - Conversation has been completed. - State string `json:"state,omitempty"` - // UserPseudoId: A unique identifier for tracking users. - UserPseudoId string `json:"userPseudoId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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 + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` + // FieldName: The field name to use for this column in the document. The name + // has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the + // qualifier bytes with best effort. However, due to different naming patterns, + // field name collisions could happen, where parsing behavior is undefined. + FieldName string `json:"fieldName,omitempty"` + // Qualifier: Required. Qualifier of the column. If it cannot be decoded with + // utf-8, use a base-64 encoded string instead. + Qualifier string `json:"qualifier,omitempty"` + // Type: The type of values in this column family. The values are expected to + // be encoded using `HBase Bytes.toBytes` function when the encoding value is + // set to `BINARY`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Encoding") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Encoding") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversation +func (s GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversationContext: Defines context of the -// conversation -type GoogleCloudDiscoveryengineV1betaConversationContext struct { - // ActiveDocument: The current active document the user opened. It contains the - // document resource reference. - ActiveDocument string `json:"activeDocument,omitempty"` - // ContextDocuments: The current list of documents the user is seeing. It - // contains the document resource references. - ContextDocuments []string `json:"contextDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveDocument") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily: The +// column family of the Bigtable. +type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct { + // Columns: The list of objects that contains column level information for each + // column. If a column is not present in this list it will be ignored. + Columns []*GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn `json:"columns,omitempty"` + // Encoding: The encoding mode of the values when the type is not STRING. + // Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric + // text strings. * `BINARY`: indicates values are encoded using `HBase + // Bytes.toBytes` family of functions. This can be overridden for a specific + // column by listing that column in `columns` and specifying an encoding for + // it. + // + // Possible values: + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` + // FieldName: The field name to use for this column family in the document. The + // name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from + // the family name with best effort. However, due to different naming patterns, + // field name collisions could happen, where parsing behavior is undefined. + FieldName string `json:"fieldName,omitempty"` + // Type: The type of values in this column family. The values are expected to + // be encoded using `HBase Bytes.toBytes` function when the encoding value is + // set to `BINARY`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Columns") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveDocument") 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. "Columns") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext +func (s GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversationMessage: Defines a conversation -// message. -type GoogleCloudDiscoveryengineV1betaConversationMessage struct { - // CreateTime: Output only. Message creation timestamp. - CreateTime string `json:"createTime,omitempty"` - // Reply: Search reply. - Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` - // UserInput: User text input. - UserInput *GoogleCloudDiscoveryengineV1betaTextInput `json:"userInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1betaBigtableSource: The Cloud Bigtable source +// for importing data. +type GoogleCloudDiscoveryengineV1betaBigtableSource struct { + // BigtableOptions: Required. Bigtable options that contains information needed + // when parsing data into typed structures. For example, column type + // annotations. + BigtableOptions *GoogleCloudDiscoveryengineV1betaBigtableOptions `json:"bigtableOptions,omitempty"` + // 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 string `json:"projectId,omitempty"` + // TableId: Required. The table ID of the Cloud Bigtable that needs to be + // imported. + TableId string `json:"tableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BigtableOptions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "BigtableOptions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage +func (s GoogleCloudDiscoveryengineV1betaBigtableSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConverseConversationRequest: Request message -// for ConversationalSearchService.ConverseConversation method. -type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { - // BoostSpec: Boost specification to boost certain documents in search results - // which may affect the converse response. For more information on boosting, - // see Boosting (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // Conversation: The conversation to be used by auto session only. The name - // field will be ignored as we automatically assign new name for the - // conversation in auto session. - Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents being - // filtered. Filter expression is case-sensitive. This will be used to filter - // search results which may affect the summary response. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI - // Search is done by mapping the LHS filter key to a key property defined in - // the Vertex AI Search backend -- this mapping is defined by the customer in - // their schema. For example a media customer might have a field 'name' in - // their schema. In this case the filter would look like this: filter --> - // name:'ANY("king kong")' For more information about filtering including - // syntax and filter operators, see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` - // Query: Required. Current user input. - Query *GoogleCloudDiscoveryengineV1betaTextInput `json:"query,omitempty"` - // SafeSearch: Whether to turn on safe search. - SafeSearch bool `json:"safeSearch,omitempty"` - // ServingConfig: The resource name of the Serving Config to use. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection}/d - // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not - // set, the default serving config will be used. - ServingConfig string `json:"servingConfig,omitempty"` - // SummarySpec: A specification for configuring the summary returned in the - // response. - SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` +// GoogleCloudDiscoveryengineV1betaCheckGroundingRequest: Request message for +// GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1betaCheckGroundingRequest struct { + // AnswerCandidate: Answer candidate to check. Can have a maximum length of + // 1024 characters. + AnswerCandidate string `json:"answerCandidate,omitempty"` + // Facts: List of facts for the grounding check. We support up to 200 facts. + Facts []*GoogleCloudDiscoveryengineV1betaGroundingFact `json:"facts,omitempty"` + // GroundingSpec: Configuration of the grounding check. + GroundingSpec *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec `json:"groundingSpec,omitempty"` // UserLabels: The user labels applied to a resource must meet the following // requirements: * Each resource can have multiple labels, up to a maximum of // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 @@ -8801,881 +9451,966 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) // for more details. UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // ForceSendFields is a list of field names (e.g. "AnswerCandidate") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") 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. "AnswerCandidate") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConverseConversationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationRequest +func (s GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConverseConversationResponse: Response -// message for ConversationalSearchService.ConverseConversation method. -type GoogleCloudDiscoveryengineV1betaConverseConversationResponse struct { - // Conversation: Updated conversation including the answer. - Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` - // RelatedQuestions: Suggested related questions. - RelatedQuestions []string `json:"relatedQuestions,omitempty"` - // Reply: Answer to the current query. - Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` - // SearchResults: Search Results. - SearchResults []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"searchResults,omitempty"` +// GoogleCloudDiscoveryengineV1betaCheckGroundingResponse: Response message for +// the GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1betaCheckGroundingResponse struct { + // CitedChunks: List of facts cited across all claims in the answer candidate. + // These are derived from the facts supplied in the request. + CitedChunks []*GoogleCloudDiscoveryengineV1betaFactChunk `json:"citedChunks,omitempty"` + // Claims: Claim texts and citation info across all claims in the answer + // candidate. + Claims []*GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim `json:"claims,omitempty"` + // SupportScore: The support score for the input answer candidate. Higher the + // score, higher is the fraction of claims that are supported by the provided + // facts. This is always set when a response is returned. + SupportScore float64 `json:"supportScore,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Conversation") to + // ForceSendFields is a list of field names (e.g. "CitedChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversation") to include in API + // NullFields is a list of field names (e.g. "CitedChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaConverseConversationResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationResponse +func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to -// the progress of the DataStoreService.CreateDataStore operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata 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 +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse + var s1 struct { + SupportScore gensupport.JSONFloat64 `json:"supportScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SupportScore = float64(s1.SupportScore) + return nil +} + +// GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim: Text and +// citation info for a claim in the answer candidate. +type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { + // CitationIndices: A list of indices (into 'cited_chunks') specifying the + // citations associated with the claim. For instance [1,3,4] means that + // cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + // supporting for the claim. A citation to a fact indicates that the claim is + // supported by the fact. + CitationIndices []int64 `json:"citationIndices,omitempty"` + // ClaimText: Text for the claim in the answer candidate. Always provided + // regardless of whether citations or anti-citations are found. + ClaimText string `json:"claimText,omitempty"` + // EndPos: Position indicating the end of the claim in the answer candidate, + // exclusive. + EndPos int64 `json:"endPos,omitempty"` + // GroundingCheckRequired: 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. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // StartPos: Position indicating the start of the claim in the answer + // candidate, measured in bytes. + StartPos int64 `json:"startPos,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationIndices") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "CitationIndices") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata +func (s GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to -// the progress of the EngineService.CreateEngine operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata 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 +// GoogleCloudDiscoveryengineV1betaCheckGroundingSpec: Specification for the +// grounding check. +type GoogleCloudDiscoveryengineV1betaCheckGroundingSpec struct { + // CitationThreshold: The threshold (in [0,1]) used for determining whether a + // fact must be cited for a claim in the answer candidate. Choosing a higher + // threshold will lead to fewer but very strong citations, while choosing a + // lower threshold may lead to more but somewhat weaker citations. If unset, + // the threshold will default to 0.6. + CitationThreshold float64 `json:"citationThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationThreshold") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "CitationThreshold") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create -// Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata 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 +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec + var s1 struct { + CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CitationThreshold = float64(s1.CitationThreshold) + return nil +} + +// GoogleCloudDiscoveryengineV1betaChunk: Chunk captures all raw metadata +// information of items to be recommended or searched in the chunk mode. +type GoogleCloudDiscoveryengineV1betaChunk struct { + // ChunkMetadata: Output only. Metadata of the current chunk. + ChunkMetadata *GoogleCloudDiscoveryengineV1betaChunkChunkMetadata `json:"chunkMetadata,omitempty"` + // Content: Content is a string from a document (parsed content). + Content string `json:"content,omitempty"` + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains + // derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata `json:"documentMetadata,omitempty"` + // Id: Unique chunk ID of the current chunk. + Id string `json:"id,omitempty"` + // Name: The full resource name of the chunk. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/branches/{branch}/documents/{document_id}/chunks/{chunk_id}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDiscoveryengineV1betaChunkPageSpan `json:"pageSpan,omitempty"` + // RelevanceScore: Output only. Represents the relevance score based on + // similarity. Higher score indicates higher chunk relevance. The score is in + // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ChunkMetadata") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1betaChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunk return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.CreateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata 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 +func (s *GoogleCloudDiscoveryengineV1betaChunk) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaChunk + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + +// GoogleCloudDiscoveryengineV1betaChunkChunkMetadata: Metadata of the current +// chunk. This field is only populated on SearchService.Search API. +type GoogleCloudDiscoveryengineV1betaChunkChunkMetadata struct { + // NextChunks: The next chunks of the current chunk. The number is controlled + // by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is + // only populated on SearchService.Search API. + NextChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"nextChunks,omitempty"` + // PreviousChunks: The previous chunks of the current chunk. The number is + // controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. + // This field is only populated on SearchService.Search API. + PreviousChunks []*GoogleCloudDiscoveryengineV1betaChunk `json:"previousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NextChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "NextChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1betaChunkChunkMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkChunkMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest: Request message for -// SiteSearchEngineService.CreateTargetSite method. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { - // Parent: Required. Parent resource name of TargetSite, such as - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/siteSearchEngine`. - Parent string `json:"parent,omitempty"` - // TargetSite: Required. The TargetSite to create. - TargetSite *GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSite,omitempty"` - // ForceSendFields is a list of field names (e.g. "Parent") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata: Document metadata +// contains the information of the document of the current chunk. +type GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata struct { + // StructData: Data representation. The structured JSON data for the document. + // It should conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "StructData") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Parent") to include in API + // NullFields is a list of field names (e.g. "StructData") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest +func (s GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkDocumentMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCustomAttribute: A custom attribute that is -// not explicitly modeled in a resource, e.g. UserEvent. -type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { - // Numbers: The numerical values of this custom attribute. For example, `[2.3, - // 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or - // CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - Numbers []float64 `json:"numbers,omitempty"` - // Text: The textual values of this custom attribute. For example, `["yellow", - // "green"]` when the key is "color". Empty string is not allowed. Otherwise, - // an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text - // or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - Text []string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "Numbers") to unconditionally +// GoogleCloudDiscoveryengineV1betaChunkPageSpan: Page span of the chunk. +type GoogleCloudDiscoveryengineV1betaChunkPageSpan struct { + // PageEnd: The end page of the chunk. + PageEnd int64 `json:"pageEnd,omitempty"` + // PageStart: The start page of the chunk. + PageStart int64 `json:"pageStart,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageEnd") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Numbers") to include in API + // NullFields is a list of field names (e.g. "PageEnd") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCustomAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute +func (s GoogleCloudDiscoveryengineV1betaChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaChunkPageSpan return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute - var s1 struct { - Numbers []gensupport.JSONFloat64 `json:"numbers"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Numbers = make([]float64, len(s1.Numbers)) - for i := range s1.Numbers { - s.Numbers[i] = float64(s1.Numbers[i]) - } - return nil -} - -// GoogleCloudDiscoveryengineV1betaCustomTuningModel: Metadata that describes a -// custom tuned model. -type GoogleCloudDiscoveryengineV1betaCustomTuningModel 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. - 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 +// GoogleCloudDiscoveryengineV1betaCloudSqlSource: Cloud SQL source import data +// from. +type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { + // DatabaseId: Required. The Cloud SQL database to copy the data from with a + // length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the import with + // a length limit of 2,000 characters. Can be specified if one wants to have + // the Cloud SQL export to a specific Cloud Storage directory. Ensure that the + // Cloud SQL service account has the necessary Cloud Storage Admin permissions + // to access the specified Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // InstanceId: Required. The Cloud SQL instance to copy the data from with a + // length limit of 256 characters. + InstanceId string `json:"instanceId,omitempty"` + // Offload: Option for serverless export. Enabling this option will incur + // 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 + // limit of 128 characters. If not specified, inherits the project ID from the + // parent request. + ProjectId string `json:"projectId,omitempty"` + // TableId: Required. The Cloud SQL table to copy the data from with a length + // limit of 256 characters. + TableId string `json:"tableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "DatabaseId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomTuningModel +func (s GoogleCloudDiscoveryengineV1betaCloudSqlSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCloudSqlSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1betaDataStore struct { - // ContentConfig: Immutable. The content config of the data store. If this - // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. - // - // Possible values: - // "CONTENT_CONFIG_UNSPECIFIED" - Default value. - // "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. - ContentConfig string `json:"contentConfig,omitempty"` - // CreateTime: Output only. Timestamp the DataStore was created at. - CreateTime string `json:"createTime,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema asscociated to - // this data store. - DefaultSchemaId string `json:"defaultSchemaId,omitempty"` - // DisplayName: Required. The data store display name. This field must be a - // UTF-8 encoded string with a length limit of 128 characters. Otherwise, an - // INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` - // DocumentProcessingConfig: Configuration for Document understanding and - // enrichment. - DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` - // IndustryVertical: Immutable. The industry vertical that the data store - // registers. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not specific to - // any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - // LanguageInfo: Language info for DataStore. - LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` - // Name: Immutable. The full resource name of the data store. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor - // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length - // limit of 1024 characters. - Name string `json:"name,omitempty"` - // SolutionTypes: The solutions that the data store enrolls. Available - // solutions for each industry_vertical: * `MEDIA`: - // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: - // `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be - // enrolled. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionTypes []string `json:"solutionTypes,omitempty"` - // StartingSchema: 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). - StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` +// GoogleCloudDiscoveryengineV1betaCompleteQueryResponse: Response message for +// CompletionService.CompleteQuery method. +type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { + // QuerySuggestions: Results of the matched query suggestions. The result list + // is ordered and the first result is a top suggestion. + QuerySuggestions []*GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` + // TailMatchTriggered: True if the returned suggestions are all tail + // suggestions. For tail matching to be triggered, include_tail_suggestions in + // the request must be true and there must be no suggestions that match the + // full query. + TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") 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. "QuerySuggestions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDataStore +func (s GoogleCloudDiscoveryengineV1betaCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to -// the progress of the DataStoreService.DeleteDataStore operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata 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 +// GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion: +// Suggestions as search queries. +type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct { + // CompletableFieldPaths: The unique document field paths that serve as the + // source of this suggestion if it was generated from completable fields. This + // field is only populated for the document-completable model. + CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` + // ForceSendFields is a list of field names (e.g. "CompletableFieldPaths") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "CompletableFieldPaths") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata +func (s GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata related to -// the progress of the EngineService.DeleteEngine operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata 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 +// GoogleCloudDiscoveryengineV1betaCompletionInfo: Detailed completion +// information including completion attribution token and clicked completion +// info. +type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { + // SelectedPosition: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0. + SelectedPosition int64 `json:"selectedPosition,omitempty"` + // SelectedSuggestion: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion. + SelectedSuggestion string `json:"selectedSuggestion,omitempty"` + // ForceSendFields is a list of field names (e.g. "SelectedPosition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "SelectedPosition") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompletionInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1betaCompletionSuggestion: Autocomplete +// suggestions that are imported from Customer. +type GoogleCloudDiscoveryengineV1betaCompletionSuggestion struct { + // AlternativePhrases: Alternative matching phrases for this suggestion. + AlternativePhrases []string `json:"alternativePhrases,omitempty"` + // Frequency: Frequency of this suggestion. Will be used to rank suggestions + // when score is not available. + Frequency int64 `json:"frequency,omitempty,string"` + // GlobalScore: Global score of this suggestion. Control how this suggestion + // would be scored / ranked. + GlobalScore float64 `json:"globalScore,omitempty"` + // GroupId: If two suggestions have the same groupId, they will not be returned + // together. Instead the one ranked higher will be returned. This can be used + // to deduplicate semantically identical suggestions. + GroupId string `json:"groupId,omitempty"` + // GroupScore: The score of this suggestion within its group. + GroupScore float64 `json:"groupScore,omitempty"` + // LanguageCode: BCP-47 language code of this suggestion. + LanguageCode string `json:"languageCode,omitempty"` + // Suggestion: Required. The suggestion text. + Suggestion string `json:"suggestion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AlternativePhrases") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "AlternativePhrases") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s GoogleCloudDiscoveryengineV1betaCompletionSuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompletionSuggestion return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.DeleteTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata 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 +func (s *GoogleCloudDiscoveryengineV1betaCompletionSuggestion) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCompletionSuggestion + var s1 struct { + GlobalScore gensupport.JSONFloat64 `json:"globalScore"` + GroupScore gensupport.JSONFloat64 `json:"groupScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GlobalScore = float64(s1.GlobalScore) + s.GroupScore = float64(s1.GroupScore) + return nil +} + +// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1betaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCondition return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata 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 +// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FullMatch") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata +func (s GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest: Request -// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: Response -// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaDocument: Document captures all raw metadata -// information of items to be recommended or searched. -type GoogleCloudDiscoveryengineV1betaDocument struct { - // Content: The unstructured data linked to this document. Content must be set - // if this document is under a `CONTENT_REQUIRED` data store. - Content *GoogleCloudDiscoveryengineV1betaDocumentContent `json:"content,omitempty"` - // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains - // derived data that are not in the original input document. - DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` - // Id: Immutable. The identifier of the document. Id should conform to RFC-1034 - // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 - // characters. - Id string `json:"id,omitempty"` - // IndexTime: Output only. The last time the document was indexed. If this - // field is set, the document could be returned in search results. This field - // is OUTPUT_ONLY. If this field is not populated, it means the document has - // never been indexed. - IndexTime string `json:"indexTime,omitempty"` - // JsonData: The JSON string representation of the document. It should conform - // to the registered Schema or an `INVALID_ARGUMENT` error is thrown. - JsonData string `json:"jsonData,omitempty"` - // Name: Immutable. The full resource name of the document. Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/branches/{branch}/documents/{document_id}`. This field must be - // a UTF-8 encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - // ParentDocumentId: The identifier of the parent document. Currently supports - // at most two level document hierarchy. Id should conform to RFC-1034 - // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 - // characters. - ParentDocumentId string `json:"parentDocumentId,omitempty"` - // SchemaId: The identifier of the schema located in the same data store. - SchemaId string `json:"schemaId,omitempty"` - // StructData: The structured JSON data for the document. It should conform to - // the registered Schema or an `INVALID_ARGUMENT` error is thrown. - StructData googleapi.RawMessage `json:"structData,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Content") to unconditionally +// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + 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. "Content") to include in API + // 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 GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocument +func (s GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentContent: Unstructured data linked to -// this document. -type GoogleCloudDiscoveryengineV1betaDocumentContent struct { - // MimeType: The MIME type of the content. Supported types: * `application/pdf` - // (PDF, only native PDFs are supported for now) * `text/html` (HTML) * - // `application/vnd.openxmlformats-officedocument.wordprocessingml.document` - // (DOCX) * - // `application/vnd.openxmlformats-officedocument.presentationml.presentation` - // (PPTX) * `text/plain` (TXT) See - // https://www.iana.org/assignments/media-types/media-types.xhtml. - MimeType string `json:"mimeType,omitempty"` - // RawBytes: The content represented as a stream of bytes. The maximum length - // is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, - // this field is represented as pure binary in Protocol Buffers and - // base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be - // represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - RawBytes string `json:"rawBytes,omitempty"` - // Uri: The URI of the content. Only Cloud Storage URIs (e.g. - // `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 - // MB for text-based formats, 200 MB for other formats. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "MimeType") to - // unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to +// 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 + // 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 + BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MimeType") 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. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentContent +func (s GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControl return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document information -// associated with a user event. -type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { - // Id: The Document resource ID. - Id string `json:"id,omitempty"` - // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataS - // tores/{data_store_id}/branches/{branch_id}/documents/{document_id}` - Name string `json:"name,omitempty"` - // PromotionIds: The promotion IDs associated with this Document. Currently, - // this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` - // Quantity: Quantity of the Document associated with the user event. Defaults - // to 1. For example, this field is 2 if two quantities of the same Document - // are involved in a `add-to-cart` event. Required for events of the following - // event types: * `add-to-cart` * `purchase` - Quantity int64 `json:"quantity,omitempty"` - // Uri: The Document URI - only allowed for website data stores. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally +// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://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 is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo +func (s GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton -// resource of DataStore. It's empty when DataStore is created, which defaults -// to digital parser. The first call to -// DataStoreService.UpdateDocumentProcessingConfig method will initialize the -// config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { - // ChunkingConfig: Whether chunking mode is enabled. - ChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` - // DefaultParsingConfig: Configurations for default Document parser. If not - // specified, we will configure it as default DigitalParsingConfig, and the - // default parsing config will be applied to all file types for Document - // parsing. - DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - // Name: The full resource name of the Document Processing Config. Format: - // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. - Name string `json:"name,omitempty"` - // ParsingConfigOverrides: Map from file type to override the default parsing - // configuration based on the file type. Supported keys: * `pdf`: Override - // parsing config for PDF files, either digital parsing, ocr parsing or layout - // parsing is supported. * `html`: Override parsing config for HTML files, only - // digital parsing and layout parsing are supported. * `docx`: Override parsing - // config for DOCX files, only digital parsing and layout parsing are - // supported. * `pptx`: Override parsing config for PPTX files, only digital - // parsing and layout parsing are supported. - ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkingConfig") 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. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig +func (s GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig: -// Configuration for chunking config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig struct { - // LayoutBasedChunkingConfig: Configuration for the layout based chunking. - LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "LayoutBasedChunkingConfig") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LayoutBasedChunkingConfig") 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. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig +func (s GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutB -// asedChunkingConfig: Configuration for the layout based chunking. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { - // ChunkSize: The token size limit for each chunk. Supported values: 100-500 - // (inclusive). Default value: 500. - ChunkSize int64 `json:"chunkSize,omitempty"` - // IncludeAncestorHeadings: Whether to include appending different levels of - // headings to chunks from the middle of the document to prevent context loss. - // Default value: False. - IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkSize") to +// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkSize") to include in API + // NullFields is a list of field names (e.g. "Synonyms") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig +func (s GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: -// Related configurations applied to a specific type of document parser. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { - // DigitalParsingConfig: Configurations applied to digital parser. - DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - // LayoutParsingConfig: Configurations applied to layout parser. - LayoutParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` - // OcrParsingConfig: Configurations applied to OCR parser. Currently it only - // applies to PDFs. - OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "DigitalParsingConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaConversation: External conversation proto +// definition. +type GoogleCloudDiscoveryengineV1betaConversation struct { + // EndTime: Output only. The time the conversation finished. + EndTime string `json:"endTime,omitempty"` + // Messages: Conversation messages. + Messages []*GoogleCloudDiscoveryengineV1betaConversationMessage `json:"messages,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/dataStore/*/con + // versations/*` or + // `projects/{project}/locations/global/collections/{collection}/engines/*/conve + // rsations/*`. + Name string `json:"name,omitempty"` + // StartTime: Output only. The time the conversation started. + StartTime string `json:"startTime,omitempty"` + // State: The state of the Conversation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Conversation is currently open. + // "COMPLETED" - Conversation has been completed. + State string `json:"state,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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. "DigitalParsingConfig") 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. "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 GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig +func (s GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalP -// arsingConfig: The digital parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +// GoogleCloudDiscoveryengineV1betaConversationContext: Defines context of the +// conversation +type GoogleCloudDiscoveryengineV1betaConversationContext struct { + // ActiveDocument: The current active document the user opened. It contains the + // document resource reference. + ActiveDocument string `json:"activeDocument,omitempty"` + // ContextDocuments: The current list of documents the user is seeing. It + // contains the document resource references. + ContextDocuments []string `json:"contextDocuments,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutPa -// rsingConfig: The layout parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { +func (s GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsi -// ngConfig: The OCR parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { - // EnhancedDocumentElements: [DEPRECATED] This field is deprecated. To use the - // additional enhanced document elements processing, please switch to - // `layout_parsing_config`. - EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` - // UseNativeText: If true, will use native text instead of OCR text on pages - // containing native text. - UseNativeText bool `json:"useNativeText,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnhancedDocumentElements") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaConversationMessage: Defines a conversation +// message. +type GoogleCloudDiscoveryengineV1betaConversationMessage struct { + // CreateTime: Output only. Message creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Reply: Search reply. + Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` + // UserInput: User text input. + UserInput *GoogleCloudDiscoveryengineV1betaTextInput `json:"userInput,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. "EnhancedDocumentElements") 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. "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 GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig +func (s GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDoubleList: Double list. -type GoogleCloudDiscoveryengineV1betaDoubleList struct { - // Values: Double values. - Values []float64 `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 +// GoogleCloudDiscoveryengineV1betaConverseConversationRequest: Request message +// for ConversationalSearchService.ConverseConversation method. +type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { + // BoostSpec: Boost specification to boost certain documents in search results + // which may affect the converse response. For more information on boosting, + // see Boosting (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Conversation: The conversation to be used by auto session only. The name + // field will be ignored as we automatically assign new name for the + // conversation in auto session. + Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. This will be used to filter + // search results which may affect the summary response. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // Query: Required. Current user input. + Query *GoogleCloudDiscoveryengineV1betaTextInput `json:"query,omitempty"` + // SafeSearch: Whether to turn on safe search. + SafeSearch bool `json:"safeSearch,omitempty"` + // ServingConfig: The resource name of the Serving Config to use. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection}/d + // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` If this is not + // set, the default serving config will be used. + ServingConfig string `json:"servingConfig,omitempty"` + // SummarySpec: A specification for configuring the summary returned in the + // response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaDoubleList) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList +func (s GoogleCloudDiscoveryengineV1betaConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaDoubleList) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList - var s1 struct { - Values []gensupport.JSONFloat64 `json:"values"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Values = make([]float64, len(s1.Values)) - for i := range s1.Values { - s.Values[i] = float64(s1.Values[i]) - } - return nil -} +// GoogleCloudDiscoveryengineV1betaConverseConversationResponse: Response +// message for ConversationalSearchService.ConverseConversation method. +type GoogleCloudDiscoveryengineV1betaConverseConversationResponse struct { + // Conversation: Updated conversation including the answer. + Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + // Reply: Answer to the current query. + Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` + // SearchResults: Search Results. + SearchResults []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"searchResults,omitempty"` -// GoogleCloudDiscoveryengineV1betaEmbeddingConfig: Defines embedding config, -// used for bring your own embeddings feature. -type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { - // FieldPath: Full field path in the schema mapped as embedding field. - FieldPath string `json:"fieldPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Conversation") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in API + // NullFields is a list of field names (e.g. "Conversation") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEmbeddingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEmbeddingConfig +func (s GoogleCloudDiscoveryengineV1betaConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be +// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to +// the progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { +type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -9694,775 +10429,814 @@ type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata +func (s GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest: Request -// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest struct { +// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to +// the progress of the EngineService.CreateEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata 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:"-"` } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: Response -// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { +func (s GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the training -// and serving parameters of an Engine. -type GoogleCloudDiscoveryengineV1betaEngine struct { - // ChatEngineConfig: Configurations for the Chat Engine. Only applicable if - // solution_type is SOLUTION_TYPE_CHAT. - ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - // ChatEngineMetadata: Output only. Additional information of the Chat Engine. - // Only applicable if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - // CommonConfig: Common config spec that specifies the metadata of the engine. - CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` - // CreateTime: Output only. Timestamp the Recommendation Engine was created at. +// GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata: Metadata for +// EvaluationService.CreateEvaluation method. +type GoogleCloudDiscoveryengineV1betaCreateEvaluationMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create +// Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { + // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // DataStoreIds: The data stores associated with this engine. For - // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they - // can only associate with at most one data store. If solution_type is - // SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be - // associated here. Note that when used in CreateEngineRequest, one DataStore - // id must be provided as the system will use it for necessary initializations. - DataStoreIds []string `json:"dataStoreIds,omitempty"` - // DisplayName: Required. The display name of the engine. Should be human - // readable. UTF-8 encoded string with limit of 1024 characters. - DisplayName string `json:"displayName,omitempty"` - // IndustryVertical: The industry vertical that the engine registers. The - // restriction of the Engine industry vertical is based on DataStore: If - // unspecified, default to `GENERIC`. Vertical on Engine has to match vertical - // of the DataStore linked to the engine. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not specific to - // any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - // Name: Immutable. The fully qualified resource name of the engine. This field - // must be a UTF-8 encoded string with a length limit of 1024 characters. - // Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/engi - // nes/{engine}` engine should be 1-63 characters, and valid characters are - // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. - Name string `json:"name,omitempty"` - // SearchEngineConfig: Configurations for the Search Engine. Only applicable if - // solution_type is SOLUTION_TYPE_SEARCH. - SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` - // SolutionType: Required. The solutions of the engine. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionType string `json:"solutionType,omitempty"` - // UpdateTime: Output only. Timestamp the Recommendation Engine was last - // updated. + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. 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. "ChatEngineConfig") to + // 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. "ChatEngineConfig") 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. "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 GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngine +func (s GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: Configurations for a -// Chat Engine. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { - // AgentCreationConfig: The configurationt generate the Dialogflow agent that - // is associated to this Engine. Note that these configurations are one-time - // consumed by and passed to Dialogflow service. It means they cannot be - // retrieved using EngineService.GetEngine or EngineService.ListEngines API - // after engine creation. - AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` - // DialogflowAgentToLink: The resource name of an exist Dialogflow agent to - // link to this Chat Engine. Customers can either provide - // `agent_creation_config` to create agent or provide an agent name that links - // the agent with the Chat engine. Format: `projects//locations//agents/`. Note - // that the `dialogflow_agent_to_link` are one-time consumed by and passed to - // Dialogflow service. It means they cannot be retrieved using - // EngineService.GetEngine or EngineService.ListEngines API after engine - // creation. Use ChatEngineMetadata.dialogflow_agent for actual agent - // association after Engine is created. - DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") to +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.CreateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata 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. "AgentCreationConfig") 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. "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 GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig +func (s GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig: -// Configurations for generating a Dialogflow agent. Note that these -// configurations are one-time consumed by and passed to Dialogflow service. It -// means they cannot be retrieved using EngineService.GetEngine or -// EngineService.ListEngines API after engine creation. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { - // Business: Name of the company, organization or other entity that the agent - // represents. Used for knowledge connector LLM prompt and for knowledge - // search. - Business string `json:"business,omitempty"` - // DefaultLanguageCode: Required. The default language of the agent as a - // language tag. See Language Support - // (https://cloud.google.com/dialogflow/docs/reference/language) for a list of - // the currently supported language codes. - DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` - // Location: Agent location for Agent creation, supported values: global/us/eu. - // If not provided, us Engine will create Agent using us-central-1 by default; - // eu Engine will create Agent using eu-west-1 by default. - Location string `json:"location,omitempty"` - // TimeZone: Required. The time zone of the agent from the time zone database - // (https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. - TimeZone string `json:"timeZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Business") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest: Request message for +// SiteSearchEngineService.CreateTargetSite method. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { + // Parent: Required. Parent resource name of TargetSite, such as + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/siteSearchEngine`. + Parent string `json:"parent,omitempty"` + // TargetSite: Required. The TargetSite to create. + TargetSite *GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSite,omitempty"` + // ForceSendFields is a list of field names (e.g. "Parent") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Business") to include in API + // NullFields is a list of field names (e.g. "Parent") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig +func (s GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional -// information of a Chat Engine. Fields in this message are output only. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { - // DialogflowAgent: The resource name of a Dialogflow agent, that this Chat - // Engine refers to. Format: `projects//locations//agents/`. - DialogflowAgent string `json:"dialogflowAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaCustomAttribute: A custom attribute that is +// not explicitly modeled in a resource, e.g. UserEvent. +type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { + // Numbers: The numerical values of this custom attribute. For example, `[2.3, + // 15.4]` when the key is "lengths_cm". Exactly one of CustomAttribute.text or + // CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + Numbers []float64 `json:"numbers,omitempty"` + // Text: The textual values of this custom attribute. For example, `["yellow", + // "green"]` when the key is "color". Empty string is not allowed. Otherwise, + // an `INVALID_ARGUMENT` error is returned. Exactly one of CustomAttribute.text + // or CustomAttribute.numbers should be set. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + Text []string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "Numbers") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DialogflowAgent") 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. "Numbers") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaCustomAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations -// for an Engine. -type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { - // CompanyName: The name of the company, business or entity that is associated - // with the engine. Setting this may help improve LLM related features. - CompanyName string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompanyName") to +func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute + var s1 struct { + Numbers []gensupport.JSONFloat64 `json:"numbers"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Numbers = make([]float64, len(s1.Numbers)) + for i := range s1.Numbers { + s.Numbers[i] = float64(s1.Numbers[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1betaCustomTuningModel: Metadata that describes a +// custom tuned model. +type GoogleCloudDiscoveryengineV1betaCustomTuningModel 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. + 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. "CompanyName") to include in API + // 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 GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig +func (s GoogleCloudDiscoveryengineV1betaCustomTuningModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomTuningModel return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: Configurations for -// a Search Engine. -type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { - // SearchAddOns: The add-on that this search engine enables. +// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1betaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If this + // field is unset, the server behavior defaults to ContentConfig.NO_CONTENT. // // Possible values: - // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is unspecified. - // This is invalid to use. - // "SEARCH_ADD_ON_LLM" - Large language model add-on. - SearchAddOns []string `json:"searchAddOns,omitempty"` - // SearchTier: The search feature tier of this engine. Different tiers might - // have different pricing. To learn more, check the pricing documentation. - // Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "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. + ContentConfig string `json:"contentConfig,omitempty"` + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + // DefaultSchemaId: Output only. The id of the default Schema asscociated to + // this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + // DisplayName: Required. The data store display name. This field must be a + // UTF-8 encoded string with a length limit of 128 characters. Otherwise, an + // INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + // DocumentProcessingConfig: Configuration for Document understanding and + // enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // IndustryVertical: Immutable. The industry vertical that the data store + // registers. // // Possible values: - // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is unspecified. - // This is invalid to use. - // "SEARCH_TIER_STANDARD" - Standard tier. - // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. - SearchTier string `json:"searchTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not specific to + // any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + // LanguageInfo: Language info for DataStore. + LanguageInfo *GoogleCloudDiscoveryengineV1betaLanguageInfo `json:"languageInfo,omitempty"` + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. This field must be a UTF-8 encoded string with a length + // limit of 1024 characters. + Name string `json:"name,omitempty"` + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: + // `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be + // enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionTypes []string `json:"solutionTypes,omitempty"` + // StartingSchema: 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). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchAddOns") to include in API + // NullFields is a list of field names (e.g. "ContentConfig") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig +func (s GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDataStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFactChunk: Fact Chunk. -type GoogleCloudDiscoveryengineV1betaFactChunk struct { - // ChunkText: Text content of the fact chunk. Can be at most 10K characters - // long. - ChunkText string `json:"chunkText,omitempty"` - // Index: The index of this chunk. Currently, only used for the streaming mode. - Index int64 `json:"index,omitempty"` - // Source: Source from which this fact chunk was retrieved. If it was retrieved - // from the GroundingFacts provided in the request then this field will contain - // the index of the specific fact from which this chunk was retrieved. - Source string `json:"source,omitempty"` - // SourceMetadata: More fine-grained information for the source reference. - SourceMetadata map[string]string `json:"sourceMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkText") to +// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata related to +// the progress of the DataStoreService.DeleteDataStore operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata 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. "ChunkText") to include in API + // 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 GoogleCloudDiscoveryengineV1betaFactChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFactChunk +func (s GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse: -// Response message for SiteSearchEngineService.FetchDomainVerificationStatus -// method. -type GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve the next - // page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // TargetSites: List of TargetSites containing the site verification status. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // TotalSize: The total number of items matching the request. This will always - // be populated in the response. - 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 +// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata related to +// the progress of the EngineService.DeleteEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata 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. "NextPageToken") to include in API + // 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 GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +func (s GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFhirStoreSource: Cloud FhirStore source -// import data from. -type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { - // FhirStore: Required. The full resource name of the FHIR store to import data - // from, in the format of - // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_ - // store}`. - FhirStore string `json:"fhirStore,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the import with - // a length limit of 2,000 characters. Can be specified if one wants to have - // the FhirStore export to a specific Cloud Storage directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // ForceSendFields is a list of field names (e.g. "FhirStore") to +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata 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. "FhirStore") to include in API + // 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 GoogleCloudDiscoveryengineV1betaFhirStoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFhirStoreSource +func (s GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFirestoreSource: Firestore source import -// data from. -type GoogleCloudDiscoveryengineV1betaFirestoreSource struct { - // CollectionId: Required. The Firestore collection (or entity) to copy the - // data from with a length limit of 1,500 characters. - CollectionId string `json:"collectionId,omitempty"` - // DatabaseId: Required. The Firestore database to copy the data from with a - // length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the import with - // a length limit of 2,000 characters. Can be specified if one wants to have - // the Firestore export to a specific Cloud Storage directory. Ensure that the - // Firestore service account has the necessary Cloud Storage Admin permissions - // to access the specified Cloud Storage directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // ProjectId: 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. - ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "CollectionId") to +// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.DeleteTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata 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. "CollectionId") to include in API + // 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 GoogleCloudDiscoveryengineV1betaFirestoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFirestoreSource +func (s GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaGcsSource: Cloud Storage location for input -// content. -type GoogleCloudDiscoveryengineV1betaGcsSource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for document imports: * `document` (default): One JSON - // Document per line. Each document must have a valid Document.id. * `content`: - // Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` - // becomes a document, with the ID set to the first 128 bits of SHA256(URI) - // encoded as a hex string. * `custom`: One custom data JSON per row in - // arbitrary format that conforms to the defined Schema of the data store. This - // can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file - // with header conforming to the defined Schema of the data store. Each entry - // after the header is imported as a Document. This can only be used by the - // GENERIC Data Store vertical. Supported values for user event imports: * - // `user_event` (default): One JSON UserEvent per line. - DataSchema string `json:"dataSchema,omitempty"` - // InputUris: Required. Cloud Storage URIs to input files. Each URI can be up - // to 2000 characters long. URIs can match the full object path (for example, - // `gs://bucket/directory/object.json`) or a pattern matching one or more - // files, such as `gs://bucket/directory/*.json`. A request can contain at most - // 100 files (or 100,000 files if `data_schema` is `content`). Each file can be - // up to 2 GB (or 100 MB if `data_schema` is `content`). - InputUris []string `json:"inputUris,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata 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. "DataSchema") to include in API + // 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 GoogleCloudDiscoveryengineV1betaGcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaGcsSource +func (s GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaGroundingFact: Grounding Fact. -type GoogleCloudDiscoveryengineV1betaGroundingFact struct { - // Attributes: Attributes associated with the fact. Common attributes include - // `source` (indicating where the fact was sourced from), `author` (indicating - // the author of the fact), and so on. - Attributes map[string]string `json:"attributes,omitempty"` - // FactText: Text content of the fact. Can be at most 10K characters long. - FactText string `json:"factText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attributes") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest: Request +// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: Response +// message for SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaDocument: Document captures all raw metadata +// information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1betaDocument struct { + // Content: The unstructured data linked to this document. Content must be set + // if this document is under a `CONTENT_REQUIRED` data store. + Content *GoogleCloudDiscoveryengineV1betaDocumentContent `json:"content,omitempty"` + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It contains + // derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + // Id: Immutable. The identifier of the document. Id should conform to RFC-1034 + // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 + // characters. + Id string `json:"id,omitempty"` + // IndexTime: Output only. The last time the document was indexed. If this + // field is set, the document could be returned in search results. This field + // is OUTPUT_ONLY. If this field is not populated, it means the document has + // never been indexed. + IndexTime string `json:"indexTime,omitempty"` + // JsonData: The JSON string representation of the document. It should conform + // to the registered Schema or an `INVALID_ARGUMENT` error is thrown. + JsonData string `json:"jsonData,omitempty"` + // Name: Immutable. The full resource name of the document. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/branches/{branch}/documents/{document_id}`. This field must be + // a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // ParentDocumentId: The identifier of the parent document. Currently supports + // at most two level document hierarchy. Id should conform to RFC-1034 + // (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 + // characters. + ParentDocumentId string `json:"parentDocumentId,omitempty"` + // SchemaId: The identifier of the schema located in the same data store. + SchemaId string `json:"schemaId,omitempty"` + // StructData: The structured JSON data for the document. It should conform to + // the registered Schema or an `INVALID_ARGUMENT` error is thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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. "Attributes") to include in API + // 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 GoogleCloudDiscoveryengineV1betaGroundingFact) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaGroundingFact +func (s GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocument return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata: -// Metadata related to the progress of the ImportCompletionSuggestions -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of CompletionSuggestions that failed to be imported. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of CompletionSuggestions successfully imported. - SuccessCount int64 `json:"successCount,omitempty,string"` - // 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 +// GoogleCloudDiscoveryengineV1betaDocumentContent: Unstructured data linked to +// this document. +type GoogleCloudDiscoveryengineV1betaDocumentContent struct { + // MimeType: The MIME type of the content. Supported types: * `application/pdf` + // (PDF, only native PDFs are supported for now) * `text/html` (HTML) * + // `application/vnd.openxmlformats-officedocument.wordprocessingml.document` + // (DOCX) * + // `application/vnd.openxmlformats-officedocument.presentationml.presentation` + // (PPTX) * `text/plain` (TXT) See + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` + // RawBytes: The content represented as a stream of bytes. The maximum length + // is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all `bytes` fields, + // this field is represented as pure binary in Protocol Buffers and + // base64-encoded string in JSON. For example, `abc123!?$*&()'-=@~` should be + // represented as `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + RawBytes string `json:"rawBytes,omitempty"` + // Uri: The URI of the content. Only Cloud Storage URIs (e.g. + // `gs://bucket-name/path/to/file`) are supported. The maximum file size is 2.5 + // MB for text-based formats, 200 MB for other formats. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "MimeType") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "MimeType") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata +func (s GoogleCloudDiscoveryengineV1betaDocumentContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentContent return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest: Request -// message for CompletionService.ImportCompletionSuggestions method. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - // ErrorConfig: The desired location of errors incurred during the Import. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // InlineSource: The Inline source for suggestion entries. - InlineSource *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource `json:"inlineSource,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 +// GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document information +// associated with a user event. +type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { + // Id: The Document resource ID. + Id string `json:"id,omitempty"` + // Name: The Document resource full name, of the form: + // `projects/{project_id}/locations/{location}/collections/{collection_id}/dataS + // tores/{data_store_id}/branches/{branch_id}/documents/{document_id}` + Name string `json:"name,omitempty"` + // PromotionIds: The promotion IDs associated with this Document. Currently, + // this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + // Quantity: Quantity of the Document associated with the user event. Defaults + // to 1. For example, this field is 2 if two quantities of the same Document + // are involved in a `add-to-cart` event. Required for events of the following + // event types: * `add-to-cart` * `purchase` + Quantity int64 `json:"quantity,omitempty"` + // Uri: The Document URI - only allowed for website data stores. + Uri string `json:"uri,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. "BigquerySource") 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. "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 GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest +func (s GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSourc -// e: The inline source for CompletionSuggestions. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource struct { - // Suggestions: Required. A list of all denylist entries to import. Max of 1000 - // items. - Suggestions []*GoogleCloudDiscoveryengineV1betaCompletionSuggestion `json:"suggestions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Suggestions") to +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which defaults +// to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will initialize the +// config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // ChunkingConfig: Whether chunking mode is enabled. + ChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` + // DefaultParsingConfig: Configurations for default Document parser. If not + // specified, we will configure it as default DigitalParsingConfig, and the + // default parsing config will be applied to all file types for Document + // parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + // Name: The full resource name of the Document Processing Config. Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`. + Name string `json:"name,omitempty"` + // ParsingConfigOverrides: Map from file type to override the default parsing + // configuration based on the file type. Supported keys: * `pdf`: Override + // parsing config for PDF files, either digital parsing, ocr parsing or layout + // parsing is supported. * `html`: Override parsing config for HTML files, only + // digital parsing and layout parsing are supported. * `docx`: Override parsing + // config for DOCX files, only digital parsing and layout parsing are + // supported. * `pptx`: Override parsing config for PPTX files, only digital + // parsing and layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Suggestions") 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. "ChunkingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse: -// Response of the CompletionService.ImportCompletionSuggestions method. If the -// long running operation is done, this message is returned by the -// google.longrunning.Operations.response field if the operation is successful. -type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse struct { - // ErrorConfig: The desired location of errors incurred during the Import. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to - // unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig: +// Configuration for chunking config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig struct { + // LayoutBasedChunkingConfig: Configuration for the layout based chunking. + LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "LayoutBasedChunkingConfig") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "LayoutBasedChunkingConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata related to -// the progress of the ImportDocuments operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // TotalCount: Total count of entries that were processed. - TotalCount int64 `json:"totalCount,omitempty,string"` - // 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 +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutB +// asedChunkingConfig: Configuration for the layout based chunking. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { + // ChunkSize: The token size limit for each chunk. Supported values: 100-500 + // (inclusive). Default value: 500. + ChunkSize int64 `json:"chunkSize,omitempty"` + // IncludeAncestorHeadings: Whether to include appending different levels of + // headings to chunks from the middle of the document to prevent context loss. + // Default value: False. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSize") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ChunkSize") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsRequest: Request message for -// Import methods. -type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { - // AlloyDbSource: AlloyDB input source. - AlloyDbSource *GoogleCloudDiscoveryengineV1betaAlloyDbSource `json:"alloyDbSource,omitempty"` - // AutoGenerateIds: Whether to automatically generate IDs for the documents if - // absent. If set to `true`, Document.ids are automatically generated based on - // the hash of the payload, where IDs may not be consistent during multiple - // imports. In which case ReconciliationMode.FULL is highly recommended to - // avoid duplicate contents. If unset or set to `false`, Document.ids have to - // be specified using id_field, otherwise, documents without IDs fail to be - // imported. Supported data sources: * GcsSource. GcsSource.data_schema must be - // `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * - // BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. - // Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * - // CloudSqlSource. * FirestoreSource. * BigtableSource. - AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - // BigtableSource: Cloud Bigtable input source. - BigtableSource *GoogleCloudDiscoveryengineV1betaBigtableSource `json:"bigtableSource,omitempty"` - // CloudSqlSource: Cloud SQL input source. - CloudSqlSource *GoogleCloudDiscoveryengineV1betaCloudSqlSource `json:"cloudSqlSource,omitempty"` - // ErrorConfig: The desired location of errors incurred during the Import. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // FhirStoreSource: FhirStore input source. - FhirStoreSource *GoogleCloudDiscoveryengineV1betaFhirStoreSource `json:"fhirStoreSource,omitempty"` - // FirestoreSource: Firestore input source. - FirestoreSource *GoogleCloudDiscoveryengineV1betaFirestoreSource `json:"firestoreSource,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // IdField: The field indicates the ID field or column to be used as unique IDs - // of the documents. For GcsSource it is the key of the JSON field. For - // instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For others, it may be - // the column name of the table where the unique ids are stored. The values of - // the JSON field or the table column are used as the Document.ids. The JSON - // field or the table column must be of string type, and the values must be set - // as valid strings conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) - // with 1-63 characters. Otherwise, documents without valid IDs fail to be - // imported. Only set this field when auto_generate_ids is unset or set as - // `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a - // default value `_id` is used when importing from the allowed data sources. - // Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` - // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. - // BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an - // INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * - // FirestoreSource. * BigtableSource. - IdField string `json:"idField,omitempty"` - // InlineSource: The Inline source for the input content for documents. - InlineSource *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` - // ReconciliationMode: The mode of reconciliation between existing documents - // and the documents to be imported. Defaults to - // ReconciliationMode.INCREMENTAL. - // - // Possible values: - // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. - // "INCREMENTAL" - Inserts new documents or updates existing documents. - // "FULL" - Calculates diff and replaces the entire document dataset. - // Existing documents may be deleted if they are not present in the source - // location. - ReconciliationMode string `json:"reconciliationMode,omitempty"` - // SpannerSource: Spanner input source. - SpannerSource *GoogleCloudDiscoveryengineV1betaSpannerSource `json:"spannerSource,omitempty"` - // UpdateMask: Indicates which fields in the provided imported documents to - // update. If not set, the default is to update all fields. - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "AlloyDbSource") to +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// Related configurations applied to a specific type of document parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + // LayoutParsingConfig: Configurations applied to layout parser. + LayoutParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` + // OcrParsingConfig: Configurations applied to OCR parser. Currently it only + // applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DigitalParsingConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AlloyDbSource") 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. "DigitalParsingConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequest +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource: The -// inline source for the input config for ImportDocuments method. -type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { - // Documents: Required. A list of documents to update/create. Each document - // must have a valid Document.id. Recommended max of 100 items. - Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` - // ForceSendFields is a list of field names (e.g. "Documents") to - // unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalP +// arsingConfig: The digital parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutPa +// rsingConfig: The layout parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsi +// ngConfig: The OCR parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { + // EnhancedDocumentElements: [DEPRECATED] This field is deprecated. To use the + // additional enhanced document elements processing, please switch to + // `layout_parsing_config`. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + // UseNativeText: If true, will use native text instead of OCR text on pages + // containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnhancedDocumentElements") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") 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. "EnhancedDocumentElements") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource +func (s GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of the -// ImportDocumentsRequest. If the long running operation is done, then this -// message is returned by the google.longrunning.Operations.response field if -// the operation was successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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 +// GoogleCloudDiscoveryengineV1betaDoubleList: Double list. +type GoogleCloudDiscoveryengineV1betaDoubleList struct { + // Values: Double values. + Values []float64 `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. "ErrorConfig") to include in API + // 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 GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s GoogleCloudDiscoveryengineV1betaDoubleList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an empty, - // existing Cloud Storage directory. Import errors are written to sharded files - // in this directory, one per line, as a JSON-encoded `google.rpc.Status` - // message. - GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to +func (s *GoogleCloudDiscoveryengineV1betaDoubleList) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList + var s1 struct { + Values []gensupport.JSONFloat64 `json:"values"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Values = make([]float64, len(s1.Values)) + for i := range s1.Values { + s.Values[i] = float64(s1.Values[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1betaEmbeddingConfig: Defines embedding config, +// used for bring your own embeddings feature. +type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { + // FieldPath: Full field path in the schema mapped as embedding field. + FieldPath string `json:"fieldPath,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in API + // NullFields is a list of field names (e.g. "FieldPath") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s GoogleCloudDiscoveryengineV1betaEmbeddingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEmbeddingConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata: -// Metadata related to the progress of the ImportSuggestionDenyListEntries -// operation. This is returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -10481,843 +11255,894 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata str NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata +func (s GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest: -// Request message for CompletionService.ImportSuggestionDenyListEntries -// method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest struct { - // GcsSource: Cloud Storage location for the input content. Only 1 file can be - // specified that contains all entries to import. Supported values - // `gcs_source.schema` for autocomplete suggestion deny list entry imports: * - // `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per - // line. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // InlineSource: The Inline source for the input content for suggestion deny - // list entries. - InlineSource *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest: Request +// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest struct { } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: Response +// message for SiteSearchEngineService.EnableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineS -// ource: The inline source for SuggestionDenyListEntry. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource struct { - // Entries: Required. A list of all denylist entries to import. Max of 1000 - // items. - Entries []*GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry `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 +// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the training +// and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1betaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable if + // solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + // ChatEngineMetadata: Output only. Additional information of the Chat Engine. + // Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + // CommonConfig: Common config spec that specifies the metadata of the engine. + CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` + // CreateTime: Output only. Timestamp the Recommendation Engine was created at. + CreateTime string `json:"createTime,omitempty"` + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they + // can only associate with at most one data store. If solution_type is + // SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be + // associated here. Note that when used in CreateEngineRequest, one DataStore + // id must be provided as the system will use it for necessary initializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + // DisplayName: Required. The display name of the engine. Should be human + // readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + // IndustryVertical: The industry vertical that the engine registers. The + // restriction of the Engine industry vertical is based on DataStore: If + // unspecified, default to `GENERIC`. Vertical on Engine has to match vertical + // of the DataStore linked to the engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not specific to + // any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + // Name: Immutable. The fully qualified resource name of the engine. This field + // must be a UTF-8 encoded string with a length limit of 1024 characters. + // Format: + // `projects/{project_number}/locations/{location}/collections/{collection}/engi + // nes/{engine}` engine should be 1-63 characters, and valid characters are + // /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. + Name string `json:"name,omitempty"` + // SearchEngineConfig: Configurations for the Search Engine. Only applicable if + // solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + 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. "ChatEngineConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ChatEngineConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource +func (s GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngine return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse: -// Response message for CompletionService.ImportSuggestionDenyListEntries -// method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // FailedEntriesCount: Count of deny list entries that failed to be imported. - FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` - // ImportedEntriesCount: Count of deny list entries successfully imported. - ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: Configurations for a +// Chat Engine. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent that + // is associated to this Engine. Note that these configurations are one-time + // consumed by and passed to Dialogflow service. It means they cannot be + // retrieved using EngineService.GetEngine or EngineService.ListEngines API + // after engine creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent to + // link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that links + // the agent with the Chat engine. Format: `projects//locations//agents/`. Note + // that the `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using + // EngineService.GetEngine or EngineService.ListEngines API after engine + // creation. Use ChatEngineMetadata.dialogflow_agent for actual agent + // association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") 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. "AgentCreationConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata related -// to the progress of the Import operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // 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 +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig: +// Configurations for generating a Dialogflow agent. Note that these +// configurations are one-time consumed by and passed to Dialogflow service. It +// means they cannot be retrieved using EngineService.GetEngine or +// EngineService.ListEngines API after engine creation. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the agent + // represents. Used for knowledge connector LLM prompt and for knowledge + // search. + Business string `json:"business,omitempty"` + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a list of + // the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + // Location: Agent location for Agent creation, supported values: global/us/eu. + // If not provided, us Engine will create Agent using us-central-1 by default; + // eu Engine will create Agent using eu-west-1 by default. + Location string `json:"location,omitempty"` + // TimeZone: Required. The time zone of the agent from the time zone database + // (https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "Business") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Business") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request message for -// the ImportUserEvents request. -type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - // ErrorConfig: The desired location of errors incurred during the Import. - // Cannot be set for inline user event imports. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // InlineSource: The Inline source for the input content for UserEvents. - InlineSource *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigquerySource") to +// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this Chat + // Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigquerySource") to include in + // NullFields is a list of field names (e.g. "DialogflowAgent") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequest +func (s GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource: The -// inline source for the input config for ImportUserEvents method. -type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct { - // UserEvents: Required. A list of user events to import. Recommended max of - // 10k items. - UserEvents []*GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvents,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserEvents") to +// GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations +// for an Engine. +type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. + CompanyName string `json:"companyName,omitempty"` + // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserEvents") to include in API + // NullFields is a list of field names (e.g. "CompanyName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource +func (s GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of the -// ImportUserEventsRequest. If the long running operation was successful, then -// this message is returned by the google.longrunning.Operations.response field -// if the operation was successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this field - // was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // JoinedEventsCount: Count of user events imported with complete existing - // Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to +// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: Configurations for +// a Search Engine. +type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is unspecified. + // This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` + // SearchTier: The search feature tier of this engine. Different tiers might + // have different pricing. To learn more, check the pricing documentation. + // Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is unspecified. + // This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` + // ForceSendFields is a list of field names (e.g. "SearchAddOns") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "SearchAddOns") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse +func (s GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. -type GoogleCloudDiscoveryengineV1betaInterval struct { - // ExclusiveMaximum: Exclusive upper bound. - ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - // ExclusiveMinimum: Exclusive lower bound. - ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` - // Maximum: Inclusive upper bound. - Maximum float64 `json:"maximum,omitempty"` - // Minimum: Inclusive lower bound. - Minimum float64 `json:"minimum,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to +// GoogleCloudDiscoveryengineV1betaEvaluation: An evaluation is a single +// execution (or run) of an evaluation process. It encapsulates the state of +// the evaluation and the resulting data. +type GoogleCloudDiscoveryengineV1betaEvaluation struct { + // CreateTime: Output only. Timestamp the Evaluation was created at. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. Timestamp the Evaluation was completed at. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. The error that occurred during evaluation. Only + // populated when the evaluation's state is FAILED. + Error *GoogleRpcStatus `json:"error,omitempty"` + // ErrorSamples: Output only. A sample of errors encountered while processing + // the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // EvaluationSpec: Required. The specification of the evaluation. + EvaluationSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec `json:"evaluationSpec,omitempty"` + // Name: Immutable. The full resource name of the Evaluation, in the format of + // `projects/{project}/locations/{location}/evaluations/{evaluation}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QualityMetrics: Output only. The metrics produced by the evaluation, + // averaged across all SampleQuerys in the SampleQuerySet. Only populated when + // the evaluation's state is SUCCEEDED. + QualityMetrics *GoogleCloudDiscoveryengineV1betaQualityMetrics `json:"qualityMetrics,omitempty"` + // State: Output only. The state of the evaluation. + // + // Possible values: + // "STATE_UNSPECIFIED" - The evaluation is unspecified. + // "PENDING" - The service is preparing to run the evaluation. + // "RUNNING" - The evaluation is in progress. + // "SUCCEEDED" - The evaluation completed successfully. + // "FAILED" - The evaluation failed. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "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. "ExclusiveMaximum") 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. "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 GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaInterval +func (s GoogleCloudDiscoveryengineV1betaEvaluation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaInterval - var s1 struct { - ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` - ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` - Maximum gensupport.JSONFloat64 `json:"maximum"` - Minimum gensupport.JSONFloat64 `json:"minimum"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) - s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) - s.Maximum = float64(s1.Maximum) - s.Minimum = float64(s1.Minimum) - return nil -} - -// GoogleCloudDiscoveryengineV1betaLanguageInfo: Language info for DataStore. -type GoogleCloudDiscoveryengineV1betaLanguageInfo struct { - // Language: Output only. Language part of normalized_language_code. E.g.: - // `en-US` -> `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. - Language string `json:"language,omitempty"` - // LanguageCode: The language code for the DataStore. - LanguageCode string `json:"languageCode,omitempty"` - // NormalizedLanguageCode: Output only. This is the normalized form of - // language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` - // will have normalized_language_code of `en-GB`. - NormalizedLanguageCode string `json:"normalizedLanguageCode,omitempty"` - // Region: Output only. Region part of normalized_language_code, if present. - // E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "Language") to +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec: Describes the +// specification of the evaluation. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec struct { + // QuerySetSpec: Required. The specification of the query set. + QuerySetSpec *GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec `json:"querySetSpec,omitempty"` + // SearchRequest: Required. The search request that is used to perform the + // evaluation. Only the following fields within SearchRequest are supported; if + // any other fields are provided, an UNSUPPORTED error will be returned: * + // SearchRequest.serving_config * SearchRequest.branch * + // SearchRequest.canonical_filter * SearchRequest.query_expansion_spec * + // SearchRequest.spell_correction_spec * SearchRequest.content_search_spec * + // SearchRequest.user_pseudo_id + SearchRequest *GoogleCloudDiscoveryengineV1betaSearchRequest `json:"searchRequest,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuerySetSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Language") to include in API + // NullFields is a list of field names (e.g. "QuerySetSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaLanguageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaLanguageInfo +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListControlsResponse: Response for -// ListControls method. -type GoogleCloudDiscoveryengineV1betaListControlsResponse struct { - // Controls: All the Controls for a given data store. - Controls []*GoogleCloudDiscoveryengineV1betaControl `json:"controls,omitempty"` - // NextPageToken: Pagination token, if not returned indicates the last page. - 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. "Controls") to +// GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec: +// Describes the specification of the query set. +type GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec struct { + // SampleQuerySet: Required. The full resource name of the SampleQuerySet used + // for the evaluation, in the format of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + SampleQuerySet string `json:"sampleQuerySet,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQuerySet") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Controls") 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. "SampleQuerySet") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListControlsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListControlsResponse +func (s GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEvaluationEvaluationSpecQuerySetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListConversationsResponse: Response for -// ListConversations method. -type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { - // Conversations: All the Conversations for a given data store. - Conversations []*GoogleCloudDiscoveryengineV1betaConversation `json:"conversations,omitempty"` - // NextPageToken: Pagination token, if not returned indicates the last page. - 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. "Conversations") to +// GoogleCloudDiscoveryengineV1betaFactChunk: Fact Chunk. +type GoogleCloudDiscoveryengineV1betaFactChunk struct { + // ChunkText: Text content of the fact chunk. Can be at most 10K characters + // long. + ChunkText string `json:"chunkText,omitempty"` + // Index: The index of this chunk. Currently, only used for the streaming mode. + Index int64 `json:"index,omitempty"` + // Source: Source from which this fact chunk was retrieved. If it was retrieved + // from the GroundingFacts provided in the request then this field will contain + // the index of the specific fact from which this chunk was retrieved. + Source string `json:"source,omitempty"` + // SourceMetadata: More fine-grained information for the source reference. + SourceMetadata map[string]string `json:"sourceMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkText") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversations") to include in API + // NullFields is a list of field names (e.g. "ChunkText") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListConversationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListConversationsResponse +func (s GoogleCloudDiscoveryengineV1betaFactChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFactChunk return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListCustomModelsResponse: Response message -// for SearchTuningService.ListCustomModels method. -type GoogleCloudDiscoveryengineV1betaListCustomModelsResponse struct { - // Models: List of custom tuning models. - Models []*GoogleCloudDiscoveryengineV1betaCustomTuningModel `json:"models,omitempty"` +// GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse: +// Response message for SiteSearchEngineService.FetchDomainVerificationStatus +// method. +type GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // TargetSites: List of TargetSites containing the site verification status. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` + // TotalSize: The total number of items matching the request. This will always + // be populated in the response. + 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. "Models") 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. "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. "Models") to include in API + // 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 GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListCustomModelsResponse +func (s GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListDataStoresResponse: Response message for -// DataStoreService.ListDataStores method. -type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { - // DataStores: All the customer's DataStores. - DataStores []*GoogleCloudDiscoveryengineV1betaDataStore `json:"dataStores,omitempty"` - // NextPageToken: A token that can be sent as ListDataStoresRequest.page_token - // to retrieve the next page. If this field is omitted, there are no subsequent - // pages. - 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. "DataStores") to +// GoogleCloudDiscoveryengineV1betaFhirStoreSource: Cloud FhirStore source +// import data from. +type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { + // FhirStore: Required. The full resource name of the FHIR store to import data + // from, in the format of + // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_ + // store}`. + FhirStore string `json:"fhirStore,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the import with + // a length limit of 2,000 characters. Can be specified if one wants to have + // the FhirStore export to a specific Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStores") to include in API + // NullFields is a list of field names (e.g. "FhirStore") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListDataStoresResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListDataStoresResponse +func (s GoogleCloudDiscoveryengineV1betaFhirStoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFhirStoreSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListDocumentsResponse: Response message for -// DocumentService.ListDocuments method. -type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { - // Documents: The Documents. - Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` - // NextPageToken: A token that can be sent as ListDocumentsRequest.page_token - // to retrieve the next page. If this field is omitted, there are no subsequent - // pages. - 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. "Documents") to +// GoogleCloudDiscoveryengineV1betaFirestoreSource: Firestore source import +// data from. +type GoogleCloudDiscoveryengineV1betaFirestoreSource struct { + // CollectionId: Required. The Firestore collection (or entity) to copy the + // data from with a length limit of 1,500 characters. + CollectionId string `json:"collectionId,omitempty"` + // DatabaseId: Required. The Firestore database to copy the data from with a + // length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the import with + // a length limit of 2,000 characters. Can be specified if one wants to have + // the Firestore export to a specific Cloud Storage directory. Ensure that the + // Firestore service account has the necessary Cloud Storage Admin permissions + // to access the specified Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // ProjectId: 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. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "CollectionId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") to include in API + // NullFields is a list of field names (e.g. "CollectionId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListDocumentsResponse +func (s GoogleCloudDiscoveryengineV1betaFirestoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFirestoreSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListEnginesResponse: Response message for -// EngineService.ListEngines method. -type GoogleCloudDiscoveryengineV1betaListEnginesResponse struct { - // Engines: All the customer's Engines. - Engines []*GoogleCloudDiscoveryengineV1betaEngine `json:"engines,omitempty"` - // NextPageToken: Not supported. - 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. "Engines") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaGcsSource: Cloud Storage location for input +// content. +type GoogleCloudDiscoveryengineV1betaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for document imports: * `document` (default): One JSON + // Document per line. Each document must have a valid Document.id. * `content`: + // Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` + // becomes a document, with the ID set to the first 128 bits of SHA256(URI) + // encoded as a hex string. * `custom`: One custom data JSON per row in + // arbitrary format that conforms to the defined Schema of the data store. This + // can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file + // with header conforming to the defined Schema of the data store. Each entry + // after the header is imported as a Document. This can only be used by the + // GENERIC Data Store vertical. Supported values for user event imports: * + // `user_event` (default): One JSON UserEvent per line. + DataSchema string `json:"dataSchema,omitempty"` + // InputUris: Required. Cloud Storage URIs to input files. Each URI can be up + // to 2000 characters long. URIs can match the full object path (for example, + // `gs://bucket/directory/object.json`) or a pattern matching one or more + // files, such as `gs://bucket/directory/*.json`. A request can contain at most + // 100 files (or 100,000 files if `data_schema` is `content`). Each file can be + // up to 2 GB (or 100 MB if `data_schema` is `content`). + InputUris []string `json:"inputUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataSchema") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engines") to include in API + // NullFields is a list of field names (e.g. "DataSchema") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListEnginesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListEnginesResponse +func (s GoogleCloudDiscoveryengineV1betaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaGcsSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListSchemasResponse: Response message for -// SchemaService.ListSchemas method. -type GoogleCloudDiscoveryengineV1betaListSchemasResponse struct { - // NextPageToken: A token that can be sent as ListSchemasRequest.page_token to - // retrieve the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // Schemas: The Schemas. - Schemas []*GoogleCloudDiscoveryengineV1betaSchema `json:"schemas,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 +// GoogleCloudDiscoveryengineV1betaGroundingFact: Grounding Fact. +type GoogleCloudDiscoveryengineV1betaGroundingFact struct { + // Attributes: Attributes associated with the fact. Common attributes include + // `source` (indicating where the fact was sourced from), `author` (indicating + // the author of the fact), and so on. + Attributes map[string]string `json:"attributes,omitempty"` + // FactText: Text content of the fact. Can be at most 10K characters long. + FactText string `json:"factText,omitempty"` + // ForceSendFields is a list of field names (e.g. "Attributes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Attributes") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListSchemasResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListSchemasResponse +func (s GoogleCloudDiscoveryengineV1betaGroundingFact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaGroundingFact return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListServingConfigsResponse: Response for -// ListServingConfigs method. -type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { - // NextPageToken: Pagination token, if not returned indicates the last page. - NextPageToken string `json:"nextPageToken,omitempty"` - // ServingConfigs: All the ServingConfigs for a given dataStore. - ServingConfigs []*GoogleCloudDiscoveryengineV1betaServingConfig `json:"servingConfigs,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 +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata: +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of CompletionSuggestions that failed to be imported. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of CompletionSuggestions successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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. "NextPageToken") to include in API + // 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 GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListServingConfigsResponse +func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListSessionsResponse: Response for -// ListSessions method. -type GoogleCloudDiscoveryengineV1betaListSessionsResponse struct { - // NextPageToken: Pagination token, if not returned indicates the last page. - NextPageToken string `json:"nextPageToken,omitempty"` - // Sessions: All the Sessions for a given data store. - Sessions []*GoogleCloudDiscoveryengineV1betaSession `json:"sessions,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 +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest: Request +// message for CompletionService.ImportCompletionSuggestions method. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // InlineSource: The Inline source for suggestion entries. + InlineSource *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource `json:"inlineSource,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 // https://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 + // NullFields is a list of field names (e.g. "BigquerySource") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListSessionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListSessionsResponse +func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListTargetSitesResponse: Response message -// for SiteSearchEngineService.ListTargetSites method. -type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve the next - // page. If this field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // TargetSites: List of TargetSites. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // TotalSize: The total number of items matching the request. This will always - // be populated in the response. - 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 +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSourc +// e: The inline source for CompletionSuggestions. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource struct { + // Suggestions: Required. A list of all denylist entries to import. Max of 1000 + // items. + Suggestions []*GoogleCloudDiscoveryengineV1betaCompletionSuggestion `json:"suggestions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Suggestions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Suggestions") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListTargetSitesResponse +func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequestInlineSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaMediaInfo: Media-specific user event -// information. -type GoogleCloudDiscoveryengineV1betaMediaInfo struct { - // MediaProgressDuration: The media progress time in seconds, if applicable. - // For example, if the end user has finished 90 seconds of a playback video, - // then MediaInfo.media_progress_duration.seconds should be set to 90. - MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` - // MediaProgressPercentage: Media progress should be computed using only the - // media_progress_duration relative to the media total length. This value must - // be between `[0, 1.0]` inclusive. If this is not a playback or the progress - // cannot be computed (e.g. ongoing livestream), this field should be unset. - MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "MediaProgressDuration") to +// GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse: +// Response of the CompletionService.ImportCompletionSuggestions method. If the +// long running operation is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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. "MediaProgressDuration") 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. "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 GoogleCloudDiscoveryengineV1betaMediaInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo +func (s GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo - var s1 struct { - MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) - return nil -} - -// GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. -type GoogleCloudDiscoveryengineV1betaPageInfo struct { - // PageCategory: The most specific category associated with a category page. To - // represent full path of category, use '>' sign to separate different - // hierarchies. If '>' is part of the category name, replace it with other - // character(s). Category pages include special pages such as sales or - // promotions. For instance, a special sale page may have the category - // hierarchy: "pageCategory" : "Sales > 2017 Black Friday Deals". Required - // for `view-category-page` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - PageCategory string `json:"pageCategory,omitempty"` - // PageviewId: A unique ID of a web page view. This should be kept the same for - // all user events triggered from the same pageview. For example, an item - // detail page view could trigger multiple events as the user is browsing the - // page. The `pageview_id` property should be kept the same for all these - // events so that they can be grouped together properly. When using the client - // side event reporting with JavaScript pixel and Google Tag Manager, this - // value is filled in automatically. - PageviewId string `json:"pageviewId,omitempty"` - // ReferrerUri: The referrer URL of the current page. When using the client - // side event reporting with JavaScript pixel and Google Tag Manager, this - // value is filled in automatically. However, some browser privacy restrictions - // may cause this field to be empty. - ReferrerUri string `json:"referrerUri,omitempty"` - // Uri: Complete URL (window.location.href) of the user's current page. When - // using the client side event reporting with JavaScript pixel and Google Tag - // Manager, this value is filled in automatically. Maximum length 5,000 - // characters. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageCategory") to +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata related to +// the progress of the ImportDocuments operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // 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. "PageCategory") to include in API + // 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 GoogleCloudDiscoveryengineV1betaPageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPageInfo +func (s GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPanelInfo: Detailed panel information -// associated with a user event. -type GoogleCloudDiscoveryengineV1betaPanelInfo struct { - // DisplayName: The display name of the panel. - DisplayName string `json:"displayName,omitempty"` - // PanelId: Required. The panel ID. - PanelId string `json:"panelId,omitempty"` - // PanelPosition: The ordered position of the panel, if shown to the user with - // other panels. If set, then total_panels must also be set. - PanelPosition int64 `json:"panelPosition,omitempty"` - // TotalPanels: The total number of panels, including this one, shown to the - // user. Must be set if panel_position is set. - TotalPanels int64 `json:"totalPanels,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequest: Request message for +// Import methods. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { + // AlloyDbSource: AlloyDB input source. + AlloyDbSource *GoogleCloudDiscoveryengineV1betaAlloyDbSource `json:"alloyDbSource,omitempty"` + // AutoGenerateIds: Whether to automatically generate IDs for the documents if + // absent. If set to `true`, Document.ids are automatically generated based on + // the hash of the payload, where IDs may not be consistent during multiple + // imports. In which case ReconciliationMode.FULL is highly recommended to + // avoid duplicate contents. If unset or set to `false`, Document.ids have to + // be specified using id_field, otherwise, documents without IDs fail to be + // imported. Supported data sources: * GcsSource. GcsSource.data_schema must be + // `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * + // BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. + // Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * + // CloudSqlSource. * FirestoreSource. * BigtableSource. + AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` + // BigtableSource: Cloud Bigtable input source. + BigtableSource *GoogleCloudDiscoveryengineV1betaBigtableSource `json:"bigtableSource,omitempty"` + // CloudSqlSource: Cloud SQL input source. + CloudSqlSource *GoogleCloudDiscoveryengineV1betaCloudSqlSource `json:"cloudSqlSource,omitempty"` + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // FhirStoreSource: FhirStore input source. + FhirStoreSource *GoogleCloudDiscoveryengineV1betaFhirStoreSource `json:"fhirStoreSource,omitempty"` + // FirestoreSource: Firestore input source. + FirestoreSource *GoogleCloudDiscoveryengineV1betaFirestoreSource `json:"firestoreSource,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // IdField: The field indicates the ID field or column to be used as unique IDs + // of the documents. For GcsSource it is the key of the JSON field. For + // instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For others, it may be + // the column name of the table where the unique ids are stored. The values of + // the JSON field or the table column are used as the Document.ids. The JSON + // field or the table column must be of string type, and the values must be set + // as valid strings conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) + // with 1-63 characters. Otherwise, documents without valid IDs fail to be + // imported. Only set this field when auto_generate_ids is unset or set as + // `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a + // default value `_id` is used when importing from the allowed data sources. + // Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` + // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. + // BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an + // INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * + // FirestoreSource. * BigtableSource. + IdField string `json:"idField,omitempty"` + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + // ReconciliationMode: The mode of reconciliation between existing documents + // and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. + // "INCREMENTAL" - Inserts new documents or updates existing documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the source + // location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` + // SpannerSource: Spanner input source. + SpannerSource *GoogleCloudDiscoveryengineV1betaSpannerSource `json:"spannerSource,omitempty"` + // UpdateMask: Indicates which fields in the provided imported documents to + // update. If not set, the default is to update all fields. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "AlloyDbSource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "AlloyDbSource") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPanelInfo +func (s GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPauseEngineRequest: Request for pausing -// training of an engine. -type GoogleCloudDiscoveryengineV1betaPauseEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a -// Google Cloud project in the service. -type GoogleCloudDiscoveryengineV1betaProject struct { - // CreateTime: Output only. The timestamp when this project is created. - CreateTime string `json:"createTime,omitempty"` - // Name: Output only. Full resource name of the project, for example - // `projects/{project_number}`. Note that when making requests, project number - // and project id are both acceptable, but the server will always respond in - // project number. - Name string `json:"name,omitempty"` - // ProvisionCompletionTime: Output only. The timestamp when this project is - // successfully provisioned. Empty value means this project is still - // provisioning and is not ready for use. - ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` - // ServiceTermsMap: Output only. A map of terms of services. The key is the - // `id` of ServiceTerms. - ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource: The +// inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each document + // must have a valid Document.id. Recommended max of 100 items. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` + // ForceSendFields is a list of field names (e.g. "Documents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Documents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaProject +func (s GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the -// terms of service. -type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { - // AcceptTime: The last time when the project agreed to the terms of service. - AcceptTime string `json:"acceptTime,omitempty"` - // DeclineTime: The last time when the project declined or revoked the - // agreement to terms of service. - DeclineTime string `json:"declineTime,omitempty"` - // Id: The unique identifier of this terms of service. Available terms: * - // `GA_DATA_USE_TERMS`: Terms for data use - // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, - // the acceptable version to provide is `2022-11-23`. - Id string `json:"id,omitempty"` - // State: Whether the project has accepted/rejected the service terms or it is - // still pending. - // - // Possible values: - // "STATE_UNSPECIFIED" - The default value of the enum. This value is not - // actually used. - // "TERMS_ACCEPTED" - The project has given consent to the terms of service. - // "TERMS_PENDING" - The project is pending to review and accept the terms of - // service. - // "TERMS_DECLINED" - The project has declined or revoked the agreement to - // terms of service. - State string `json:"state,omitempty"` - // Version: The version string of the terms of service. For acceptable values, - // see the comments for id above. - Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceptTime") to +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of the +// ImportDocumentsRequest. If the long running operation is done, then this +// message is returned by the google.longrunning.Operations.response field if +// the operation was successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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. "AcceptTime") to include in API + // 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 GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms +func (s GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata -// associated with a project provision operation. -type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { -} - -// GoogleCloudDiscoveryengineV1betaProvisionProjectRequest: Request for -// ProjectService.ProvisionProject method. -type GoogleCloudDiscoveryengineV1betaProvisionProjectRequest struct { - // AcceptDataUseTerms: Required. Set to `true` to specify that caller has read - // and would like to give consent to the Terms for data use - // (https://cloud.google.com/retail/data-use-terms). - AcceptDataUseTerms bool `json:"acceptDataUseTerms,omitempty"` - // DataUseTermsVersion: Required. The version of the Terms for data use - // (https://cloud.google.com/retail/data-use-terms) that caller has read and - // would like to give consent to. Acceptable version is `2022-11-23`, and this - // may change over time. - DataUseTermsVersion string `json:"dataUseTermsVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "AcceptDataUseTerms") to +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an empty, + // existing Cloud Storage directory. Import errors are written to sharded files + // in this directory, one per line, as a JSON-encoded `google.rpc.Status` + // message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AcceptDataUseTerms") 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. "GcsPrefix") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaProvisionProjectRequest +func (s GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest: Request -// message for CompletionService.PurgeCompletionSuggestions method. -type GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to -// the progress of the PurgeDocuments operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata: Metadata +// related to the progress of the ImportSampleQueries operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata struct { + // CreateTime: ImportSampleQueries operation create time. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. + // FailureCount: Count of SampleQuerys that failed to be imported. FailureCount int64 `json:"failureCount,omitempty,string"` - // IgnoredCount: Count of entries that were ignored as entries were not found. - IgnoredCount int64 `json:"ignoredCount,omitempty,string"` - // SuccessCount: Count of entries that were deleted successfully. + // SuccessCount: Count of SampleQuerys successfully imported. SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. + // TotalCount: Total count of SampleQuerys that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: ImportSampleQueries 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 @@ -11332,73 +12157,96 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest: Request message for -// DocumentService.PurgeDocuments method. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest struct { - // Filter: Required. Filter matching documents to purge. Only currently - // supported value is `*` (all items). - Filter string `json:"filter,omitempty"` - // Force: Actually performs the purge. If `force` is set to false, return the - // expected purge count without deleting any documents. - Force bool `json:"force,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest: Request message +// for SampleQueryService.ImportSampleQueries method. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // InlineSource: The Inline source for sample query entries. + InlineSource *GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource `json:"inlineSource,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 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API + // NullFields is a list of field names (e.g. "BigquerySource") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource: The +// inline source for SampleQuerys. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource struct { + // SampleQueries: Required. A list of SampleQuerys to import. Max of 1000 + // items. + SampleQueries []*GoogleCloudDiscoveryengineV1betaSampleQuery `json:"sampleQueries,omitempty"` + // ForceSendFields is a list of field names (e.g. "SampleQueries") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SampleQueries") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest +func (s GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequestInlineSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for -// DocumentService.PurgeDocuments method. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` - // PurgeSample: A sample of document names that will be deleted. Only populated - // if `force` is set to false. A max of 100 names will be returned and the - // names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to +// GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse: Response of the +// SampleQueryService.ImportSampleQueries method. If the long running operation +// is done, this message is returned by the +// google.longrunning.Operations.response field if the operation is successful. +type GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse struct { + // ErrorConfig: The desired location of errors incurred during the Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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. "PurgeCount") to include in API + // 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 GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSampleQueriesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: -// Metadata related to the progress of the PurgeSuggestionDenyListEntries +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata: +// Metadata related to the progress of the ImportSuggestionDenyListEntries // operation. This is returned by the google.longrunning.Operation.metadata // field. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata struct { +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -11417,3646 +12265,7522 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata stru NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata +func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest: -// Request message for CompletionService.PurgeSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse: -// Response message for CompletionService.PurgeSuggestionDenyListEntries +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest: +// Request message for CompletionService.ImportSuggestionDenyListEntries // method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // PurgeCount: Number of suggestion deny list entries purged. - PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest struct { + // GcsSource: Cloud Storage location for the input content. Only 1 file can be + // specified that contains all entries to import. Supported values + // `gcs_source.schema` for autocomplete suggestion deny list entry imports: * + // `suggestion_deny_list` (default): One JSON [SuggestionDenyListEntry] per + // line. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // InlineSource: The Inline source for the input content for suggestion deny + // list entries. + InlineSource *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsSource") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include in API + // NullFields is a list of field names (e.g. "GcsSource") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse +func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaQuery: Defines a user inputed query. -type GoogleCloudDiscoveryengineV1betaQuery struct { - // QueryId: Unique Id for the query. - QueryId string `json:"queryId,omitempty"` - // Text: Plain text. - Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineS +// ource: The inline source for SuggestionDenyListEntry. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource struct { + // Entries: Required. A list of all denylist entries to import. Max of 1000 + // items. + Entries []*GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry `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. "QueryId") 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 GoogleCloudDiscoveryengineV1betaQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaQuery +func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRankRequest: Request message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankRequest struct { - // IgnoreRecordDetailsInResponse: If true, the response will contain only - // record ID and score. By default, it is false, the response will contain - // record details. - IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` - // Model: The identifier of the model to use. It is one of: * - // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input - // token size 512. It is set to `semantic-ranker-512@latest` by default if - // unspecified. - Model string `json:"model,omitempty"` - // Query: The query to use. - Query string `json:"query,omitempty"` - // Records: Required. A list of records to rank. At most 200 records to rank. - Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` - // TopN: The number of results to return. If this is unset or no bigger than - // zero, returns all results. - TopN int64 `json:"topN,omitempty"` - // UserLabels: The user labels applied to a resource must meet the following - // requirements: * Each resource can have multiple labels, up to a maximum of - // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 - // character and a maximum length of 63 characters and cannot be empty. Values - // can be empty and have a maximum length of 63 characters. * Keys and values - // can contain only lowercase letters, numeric characters, underscores, and - // dashes. All characters must use UTF-8 encoding, and international characters - // are allowed. * The key portion of a label must be unique. However, you can - // use the same key with multiple resources. * Keys must start with a lowercase - // letter or international character. See Google Cloud Document - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "IgnoreRecordDetailsInResponse") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse: +// Response message for CompletionService.ImportSuggestionDenyListEntries +// method. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // FailedEntriesCount: Count of deny list entries that failed to be imported. + FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` + // ImportedEntriesCount: Count of deny list entries successfully imported. + ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IgnoreRecordDetailsInResponse") - // 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. "ErrorSamples") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaRankRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankRequest +func (s GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRankResponse: Response message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankResponse struct { - // Records: A list of records sorted by descending score. - Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Records") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata related +// to the progress of the Import operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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. "Records") to include in API + // 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 GoogleCloudDiscoveryengineV1betaRankResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankResponse +func (s GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRankingRecord: Record message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankingRecord struct { - // Content: The content of the record. Empty by default. At least one of title - // or content should be set otherwise an INVALID_ARGUMENT error is thrown. - Content string `json:"content,omitempty"` - // Id: The unique ID to represent the record. - Id string `json:"id,omitempty"` - // Score: The score of this record based on the given query and selected model. - Score float64 `json:"score,omitempty"` - // Title: The title of the record. Empty by default. At least one of title or - // content should be set otherwise an INVALID_ARGUMENT error is thrown. - Title string `json:"title,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 +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request message for +// the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` + // ErrorConfig: The desired location of errors incurred during the Import. + // Cannot be set for inline user event imports. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // InlineSource: The Inline source for the input content for UserEvents. + InlineSource *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource `json:"inlineSource,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 + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BigquerySource") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource: The +// inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended max of + // 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvents,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserEvents") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UserEvents") to include in API + // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of the +// ImportUserEventsRequest. If the long running operation was successful, then +// this message is returned by the google.longrunning.Operations.response field +// if the operation was successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this field + // was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // JoinedEventsCount: Count of user events imported with complete existing + // Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // 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. "Content") to include in API + // 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 GoogleCloudDiscoveryengineV1betaRankingRecord) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord +func (s GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord +// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1betaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Score = float64(s1.Score) + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) return nil } -// GoogleCloudDiscoveryengineV1betaRecommendRequest: Request message for -// Recommend method. -type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { - // Filter: Filter for restricting recommendation results with a length limit of - // 5,000 characters. Currently, only filter expressions on the `filter_tags` - // attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR - // filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND - // NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to - // true under the `params` field, then attribute-based expressions are expected - // instead of the above described tag-based syntax. Examples: * (launguage: - // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND - // (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter - // blocks all results, the API returns generic (unfiltered) popular Documents. - // If you only want results strictly matching the filters, set - // `strictFiltering` to `true` in RecommendRequest.params to receive empty - // results instead. Note that the API never returns Documents with - // `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices. - Filter string `json:"filter,omitempty"` - // PageSize: Maximum number of results to return. Set this property to the - // number of recommendation results needed. If zero, the service chooses a - // reasonable default. The maximum allowed value is 100. Values above 100 are - // set to 100. - PageSize int64 `json:"pageSize,omitempty"` - // Params: Additional domain specific parameters for the recommendations. - // Allowed values: * `returnDocument`: Boolean. If set to `true`, the - // associated Document object is returned in - // RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. - // If set to true, the recommendation score corresponding to each returned - // Document is set in RecommendResponse.RecommendationResult.metadata. The - // given score indicates the probability of a Document conversion given the - // user's context and history. * `strictFiltering`: Boolean. True by default. - // If set to `false`, the service returns generic (unfiltered) popular - // Documents instead of empty if your filter blocks all recommendation results. - // * `diversityLevel`: String. Default empty. If set to be non-empty, then it - // needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` - // * `high-diversity` * `auto-diversity` This gives request-level control and - // adjusts recommendation results based on Document category. * - // `attributeFilteringSyntax`: Boolean. False by default. If set to true, the - // `filter` field is interpreted according to the new, attribute-based syntax. - Params googleapi.RawMessage `json:"params,omitempty"` - // UserEvent: Required. Context about the user, what they are looking at and - // what action they took to trigger the Recommend request. Note that this user - // event detail won't be ingested to userEvent logs. Thus, a separate userEvent - // write request is required for event logging. Don't set - // UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID - // for different users. If you are trying to receive non-personalized - // recommendations (not recommended; this can negatively impact model - // performance), instead set UserEvent.user_pseudo_id to a random unique ID and - // leave UserEvent.user_info.user_id unset. - UserEvent *GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvent,omitempty"` - // UserLabels: The user labels applied to a resource must meet the following - // requirements: * Each resource can have multiple labels, up to a maximum of - // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 - // character and a maximum length of 63 characters and cannot be empty. Values - // can be empty and have a maximum length of 63 characters. * Keys and values - // can contain only lowercase letters, numeric characters, underscores, and - // dashes. All characters must use UTF-8 encoding, and international characters - // are allowed. * The key portion of a label must be unique. However, you can - // use the same key with multiple resources. * Keys must start with a lowercase - // letter or international character. See Requirements for labels - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - // ValidateOnly: Use validate only mode for this recommendation query. If set - // to `true`, a fake model is used that returns arbitrary Document IDs. Note - // that the validate only mode should only be used for testing the API, or if - // the model is not ready. - ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaLanguageInfo: Language info for DataStore. +type GoogleCloudDiscoveryengineV1betaLanguageInfo struct { + // Language: Output only. Language part of normalized_language_code. E.g.: + // `en-US` -> `en`, `zh-Hans-HK` -> `zh`, `en` -> `en`. + Language string `json:"language,omitempty"` + // LanguageCode: The language code for the DataStore. + LanguageCode string `json:"languageCode,omitempty"` + // NormalizedLanguageCode: Output only. This is the normalized form of + // language_code. E.g.: language_code of `en-GB`, `en_GB`, `en-UK` or `en-gb` + // will have normalized_language_code of `en-GB`. + NormalizedLanguageCode string `json:"normalizedLanguageCode,omitempty"` + // Region: Output only. Region part of normalized_language_code, if present. + // E.g.: `en-US` -> `US`, `zh-Hans-HK` -> `HK`, `en` -> ``. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "Language") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API + // NullFields is a list of field names (e.g. "Language") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaRecommendRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendRequest +func (s GoogleCloudDiscoveryengineV1betaLanguageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaLanguageInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecommendResponse: Response message for -// Recommend method. -type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { - // AttributionToken: A unique attribution token. This should be included in the - // UserEvent logs resulting from this recommendation, which enables accurate - // attribution of recommendation model performance. - AttributionToken string `json:"attributionToken,omitempty"` - // MissingIds: IDs of documents in the request that were missing from the - // default Branch associated with the requested ServingConfig. - MissingIds []string `json:"missingIds,omitempty"` - // Results: A list of recommended Documents. The order represents the ranking - // (from the most relevant Document to the least). - Results []*GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult `json:"results,omitempty"` - // ValidateOnly: True if RecommendRequest.validate_only was set. - ValidateOnly bool `json:"validateOnly,omitempty"` +// GoogleCloudDiscoveryengineV1betaListControlsResponse: Response for +// ListControls method. +type GoogleCloudDiscoveryengineV1betaListControlsResponse struct { + // Controls: All the Controls for a given data store. + Controls []*GoogleCloudDiscoveryengineV1betaControl `json:"controls,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last page. + 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. "AttributionToken") to + // ForceSendFields is a list of field names (e.g. "Controls") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributionToken") 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. "Controls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaRecommendResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponse +func (s GoogleCloudDiscoveryengineV1betaListControlsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListControlsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult: -// RecommendationResult represents a generic recommendation result with -// associated metadata. -type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struct { - // Document: Set if `returnDocument` is set to true in RecommendRequest.params. - Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` - // Id: Resource ID of the recommended Document. - Id string `json:"id,omitempty"` - // Metadata: Additional Document metadata or annotations. Possible values: * - // `score`: Recommendation score in double value. Is set if `returnScore` is - // set to true in RecommendRequest.params. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to +// GoogleCloudDiscoveryengineV1betaListConversationsResponse: Response for +// ListConversations method. +type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { + // Conversations: All the Conversations for a given data store. + Conversations []*GoogleCloudDiscoveryengineV1betaConversation `json:"conversations,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last page. + 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. "Conversations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in API + // NullFields is a list of field names (e.g. "Conversations") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult +func (s GoogleCloudDiscoveryengineV1betaListConversationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListConversationsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest: Request message for -// SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { - // Uris: Required. List of URIs to crawl. At most 10K URIs are supported, - // otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at - // least one TargetSite in `site_search_engine`. - Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally +// GoogleCloudDiscoveryengineV1betaListCustomModelsResponse: Response message +// for SearchTuningService.ListCustomModels method. +type GoogleCloudDiscoveryengineV1betaListCustomModelsResponse struct { + // Models: List of custom tuning models. + Models []*GoogleCloudDiscoveryengineV1betaCustomTuningModel `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. "Uris") 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. "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 GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest +func (s GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListCustomModelsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaReply: Defines a reply message to user. -type GoogleCloudDiscoveryengineV1betaReply struct { - // References: References in the reply. - References []*GoogleCloudDiscoveryengineV1betaReplyReference `json:"references,omitempty"` - // Reply: DEPRECATED: use `summary` instead. Text reply. - Reply string `json:"reply,omitempty"` - // Summary: Summary based on search results. - Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "References") to +// GoogleCloudDiscoveryengineV1betaListDataStoresResponse: Response message for +// DataStoreService.ListDataStores method. +type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { + // DataStores: All the customer's DataStores. + DataStores []*GoogleCloudDiscoveryengineV1betaDataStore `json:"dataStores,omitempty"` + // NextPageToken: A token that can be sent as ListDataStoresRequest.page_token + // to retrieve the next page. If this field is omitted, there are no subsequent + // pages. + 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. "DataStores") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "References") to include in API + // NullFields is a list of field names (e.g. "DataStores") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaReply) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaReply +func (s GoogleCloudDiscoveryengineV1betaListDataStoresResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListDataStoresResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaReplyReference: Defines reference in reply. -type GoogleCloudDiscoveryengineV1betaReplyReference struct { - // AnchorText: Anchor text. - AnchorText string `json:"anchorText,omitempty"` - // End: Anchor text end index. - End int64 `json:"end,omitempty"` - // Start: Anchor text start index. - Start int64 `json:"start,omitempty"` - // Uri: URI link reference. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "AnchorText") to +// GoogleCloudDiscoveryengineV1betaListDocumentsResponse: Response message for +// DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` + // NextPageToken: A token that can be sent as ListDocumentsRequest.page_token + // to retrieve the next page. If this field is omitted, there are no subsequent + // pages. + 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. "Documents") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnchorText") to include in API + // NullFields is a list of field names (e.g. "Documents") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaReplyReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaReplyReference +func (s GoogleCloudDiscoveryengineV1betaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListDocumentsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaResumeEngineRequest: Request for resuming -// training of an engine. -type GoogleCloudDiscoveryengineV1betaResumeEngineRequest struct { +// GoogleCloudDiscoveryengineV1betaListEnginesResponse: Response message for +// EngineService.ListEngines method. +type GoogleCloudDiscoveryengineV1betaListEnginesResponse struct { + // Engines: All the customer's Engines. + Engines []*GoogleCloudDiscoveryengineV1betaEngine `json:"engines,omitempty"` + // NextPageToken: Not supported. + 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. "Engines") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Engines") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of -// a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - // Name: Immutable. The full resource name of the schema, in the format of - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` +func (s GoogleCloudDiscoveryengineV1betaListEnginesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListEnginesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse: Response +// message for EvaluationService.ListEvaluationResults method. +type GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse struct { + // EvaluationResults: The EvaluationResults. + EvaluationResults []*GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult `json:"evaluationResults,omitempty"` + // NextPageToken: A token that can be sent as + // ListEvaluationResultsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + 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. "JsonSchema") to + // ForceSendFields is a list of field names (e.g. "EvaluationResults") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") 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. "EvaluationResults") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchInfo: Detailed search information. -type GoogleCloudDiscoveryengineV1betaSearchInfo struct { - // Offset: An integer that specifies the current offset for pagination (the - // 0-indexed starting location, amongst the products deemed by the API as - // relevant). See SearchRequest.offset for definition. If this field is - // negative, an `INVALID_ARGUMENT` is returned. This can only be set for - // `search` events. Other event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - Offset int64 `json:"offset,omitempty"` - // OrderBy: The order in which products are returned, if applicable. See - // SearchRequest.order_by for definition and syntax. The value must be a UTF-8 - // encoded string with a length limit of 1,000 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. This can only be set for `search` - // events. Other event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - OrderBy string `json:"orderBy,omitempty"` - // SearchQuery: The user's search query. See SearchRequest.query for - // definition. The value must be a UTF-8 encoded string with a length limit of - // 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At - // least one of search_query or PageInfo.page_category is required for `search` - // events. Other event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - SearchQuery string `json:"searchQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Offset") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult +// : Represents the results of an evaluation for a single SampleQuery. +type GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult struct { + // QualityMetrics: Output only. The metrics produced by the evaluation, for a + // given SampleQuery. + QualityMetrics *GoogleCloudDiscoveryengineV1betaQualityMetrics `json:"qualityMetrics,omitempty"` + // SampleQuery: Output only. The SampleQuery that was evaluated. + SampleQuery *GoogleCloudDiscoveryengineV1betaSampleQuery `json:"sampleQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "QualityMetrics") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Offset") to include in API + // NullFields is a list of field names (e.g. "QualityMetrics") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponseEvaluationResult + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaListEvaluationsResponse: Response message +// for EvaluationService.ListEvaluations method. +type GoogleCloudDiscoveryengineV1betaListEvaluationsResponse struct { + // Evaluations: The Evaluations. + Evaluations []*GoogleCloudDiscoveryengineV1betaEvaluation `json:"evaluations,omitempty"` + // NextPageToken: A token that can be sent as ListEvaluationsRequest.page_token + // to retrieve the next page. If this field is omitted, there are no subsequent + // pages. + 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. "Evaluations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Evaluations") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchInfo +func (s GoogleCloudDiscoveryengineV1betaListEvaluationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListEvaluationsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1betaSearchRequest struct { - // BoostSpec: Boost specification to boost certain documents. For more - // information on boosting, see Boosting - // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) - BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // Branch: The branch resource name, such as - // `projects/*/locations/global/collections/default_collection/dataStores/defaul - // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave - // this field empty, to search documents under the default branch. - Branch string `json:"branch,omitempty"` - // CanonicalFilter: The default filter that is applied when a user performs a - // search without checking any filters on the search page. The filter applied - // to every search request when quality improvement such as query expansion is - // needed. In the case a query does not have a sufficient amount of results - // this filter will be used to determine whether or not to enable the query - // expansion flow. The original filter will still be used for the query - // expanded search. This field is strongly recommended to achieve high search - // quality. For more information about filter syntax, see SearchRequest.filter. - CanonicalFilter string `json:"canonicalFilter,omitempty"` - // ContentSearchSpec: A specification for configuring the behavior of content - // search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - // DataStoreSpecs: Specs defining dataStores to filter on in a search call and - // configurations for those dataStores. This is only considered for engines - // with multiple dataStores use case. For single dataStore within an engine, - // they should use the specs at the top level. - DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` - // EmbeddingSpec: Uses the provided embedding to do additional semantic - // document retrieval. The retrieval is based on the dot product of - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document - // embedding that is provided in - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it - // will use ServingConfig.EmbeddingConfig.field_path. - EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` - // FacetSpecs: Facet specifications for faceted search. If empty, no facets are - // returned. A maximum of 100 values are allowed. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents being - // filtered. Filter expression is case-sensitive. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI - // Search is done by mapping the LHS filter key to a key property defined in - // the Vertex AI Search backend -- this mapping is defined by the customer in - // their schema. For example a media customer might have a field 'name' in - // their schema. In this case the filter would look like this: filter --> - // name:'ANY("king kong")' For more information about filtering including - // syntax and filter operators, see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` - // ImageQuery: Raw image query. - ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` - // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For - // more information, see Standard fields - // (https://cloud.google.com/apis/design/standard_fields). This field helps to - // better interpret the query. If a value isn't specified, the query language - // code is automatically detected, which may not be accurate. - LanguageCode string `json:"languageCode,omitempty"` - // NaturalLanguageQueryUnderstandingSpec: If - // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional - // natural language query understanding will be done. - NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` - // Offset: A 0-indexed integer that specifies the current offset (that is, - // starting result location, amongst the Documents deemed by the API as - // relevant) in search results. This field is only considered if page_token is - // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. - Offset int64 `json:"offset,omitempty"` - // OrderBy: The order in which documents are returned. Documents can be ordered - // by a field in an Document object. Leave it unset if ordered by relevance. - // `order_by` expression is case-sensitive. For more information on ordering - // for retail search, see Ordering - // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field - // is unrecognizable, an `INVALID_ARGUMENT` is returned. - OrderBy string `json:"orderBy,omitempty"` - // PageSize: Maximum number of Documents to return. The maximum allowed value - // depends on the data type. Values above the maximum value are coerced to the - // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * - // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: - // Default `50`, Maximum `100`. If this field is negative, an - // `INVALID_ARGUMENT` is returned. - PageSize int64 `json:"pageSize,omitempty"` - // PageToken: A page token received from a previous SearchService.Search call. - // Provide this to retrieve the subsequent page. When paginating, all other - // parameters provided to SearchService.Search must match the call that - // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. - PageToken string `json:"pageToken,omitempty"` - // Params: Additional search parameters. For public website search only, - // supported values are: * `user_country_code`: string. Default empty. If set - // to non-empty, results are restricted or boosted based on the location - // provided. For example, `user_country_code: "au" For available codes see - // Country Codes - // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) - // * `search_type`: double. Default empty. Enables non-webpage searching - // depending on the value. The only valid non-default value is 1, which enables - // image searching. For example, `search_type: 1` - Params googleapi.RawMessage `json:"params,omitempty"` - // Query: Raw search query. - Query string `json:"query,omitempty"` - // QueryExpansionSpec: The query expansion specification that specifies the - // conditions under which query expansion occurs. - QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` - // RankingExpression: The ranking expression controls the customized ranking on - // retrieval documents. This overrides ServingConfig.ranking_expression. The - // ranking expression is a single function or multiple functions that are - // joined by "+". * ranking_expression = function, { " + ", function }; - // Supported functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: * `relevance_score`: - // pre-defined keywords, used for measure relevance between query and document. - // * `embedding_field_path`: the document embedding field used with query - // embedding vector. * `dotProduct`: embedding function between - // embedding_field_path and query embedding vector. Example ranking expression: - // If document has an embedding field doc_embedding, the ranking expression - // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. - RankingExpression string `json:"rankingExpression,omitempty"` - // RegionCode: 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. - RegionCode string `json:"regionCode,omitempty"` - // SafeSearch: Whether to turn on safe search. This is only supported for - // website search. - SafeSearch bool `json:"safeSearch,omitempty"` - // SearchAsYouTypeSpec: Search as you type configuration. Only supported for - // the IndustryVertical.MEDIA vertical. - SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` - // Session: The session resource name. Optional. Session allows users to do - // multi-turn /search API calls or coordination between /search API calls and - // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call - // /search API with the auto-session mode (see below). 2. Call /search API with - // the session ID generated in the first call. Here, the previous search query - // gets considered in query standing. I.e., if the first query is "How did - // Alphabet do in 2022?" and the current query is "How about 2023?", the - // current query will be interpreted as "How did Alphabet do in 2023?". Example - // #2 (coordination between /search API calls and /answer API calls): 1. Call - // /search API with the auto-session mode (see below). 2. Call /answer API with - // the session ID generated in the first call. Here, the answer generation - // happens in the context of the search results from the first search call. - // Auto-session mode: when `projects/.../sessions/-` is used, a new session - // gets automatically created. Otherwise, users can use the create-session API - // to create a session manually. Multi-turn Search feature is currently at - // private GA stage. Please use v1alpha or v1beta version instead before we - // launch this feature to public GA. Or ask for allowlisting through Google - // Support team. - Session string `json:"session,omitempty"` - // SessionSpec: Session specification. Can be used only when `session` is set. - SessionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` - // SpellCorrectionSpec: The spell correction specification that specifies the - // mode under which spell correction takes effect. - SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` - // UserInfo: Information about the end user. Highly recommended for analytics. - // UserInfo.user_agent is used to deduce `device_type` for analytics. - UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` - // UserLabels: The user labels applied to a resource must meet the following - // requirements: * Each resource can have multiple labels, up to a maximum of - // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 - // character and a maximum length of 63 characters and cannot be empty. Values - // can be empty and have a maximum length of 63 characters. * Keys and values - // can contain only lowercase letters, numeric characters, underscores, and - // dashes. All characters must use UTF-8 encoding, and international characters - // are allowed. * The key portion of a label must be unique. However, you can - // use the same key with multiple resources. * Keys must start with a lowercase - // letter or international character. See Google Cloud Document - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - // UserPseudoId: A unique identifier for tracking visitors. For example, this - // could be implemented with an HTTP cookie, which should be able to uniquely - // identify a visitor on a single device. This unique identifier should not - // change if the visitor logs in or out of the website. This field should NOT - // have a fixed value such as `unknown_visitor`. This should be the same - // identifier as UserEvent.user_pseudo_id and - // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string - // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - UserPseudoId string `json:"userPseudoId,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to +// GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse: Response message +// for SampleQueryService.ListSampleQueries method. +type GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse struct { + // NextPageToken: A token that can be sent as + // ListSampleQueriesRequest.page_token to retrieve the next page. If this field + // is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // SampleQueries: The SampleQuerys. + SampleQueries []*GoogleCloudDiscoveryengineV1betaSampleQuery `json:"sampleQueries,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. "BoostSpec") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest +func (s GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost specification -// to boost certain documents. -type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { - // ConditionBoostSpecs: Condition boost specifications. If a document matches - // multiple conditions in the specifictions, boost scores from these - // specifications are all applied and combined in a non-linear way. Maximum - // number of specifications is 20. - ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to +// GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse: Response +// message for SampleQuerySetService.ListSampleQuerySets method. +type GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse struct { + // NextPageToken: A token that can be sent as + // ListSampleQuerySetsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // SampleQuerySets: The SampleQuerySets. + SampleQuerySets []*GoogleCloudDiscoveryengineV1betaSampleQuerySet `json:"sampleQuerySets,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. "ConditionBoostSpecs") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec: -// Boost applies to documents which match a condition. -type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { - // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative - // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a - // big promotion. However, it does not necessarily mean that the boosted - // document will be the top result at all times, nor that other documents will - // be excluded. Results could still be shown even when none of them matches the - // condition. And results that are significantly more relevant to the search - // query can still trump your heavily favored but irrelevant documents. Setting - // to -1.0 gives the document a big demotion. However, results that are deeply - // relevant might still be shown. The document will have an upstream battle to - // get a fairly high ranking, but it is not blocked out completely. Setting to - // 0.0 means no boost applied. The boosting condition is ignored. Only one of - // the (condition, boost) combination or the boost_control_spec below are set. - // If both are set then the global boost is ignored and the more fine-grained - // boost_control_spec is applied. - Boost float64 `json:"boost,omitempty"` - // BoostControlSpec: Complex specification for custom ranking based on customer - // defined attribute value. - BoostControlSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` - // Condition: An expression which specifies a boost condition. The syntax and - // supported fields are the same as a filter expression. See - // SearchRequest.filter for detail syntax and limitations. Examples: * To boost - // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": - // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` - Condition string `json:"condition,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Boost") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec +func (s GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} +// GoogleCloudDiscoveryengineV1betaListSchemasResponse: Response message for +// SchemaService.ListSchemas method. +type GoogleCloudDiscoveryengineV1betaListSchemasResponse struct { + // NextPageToken: A token that can be sent as ListSchemasRequest.page_token to + // retrieve the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // Schemas: The Schemas. + Schemas []*GoogleCloudDiscoveryengineV1betaSchema `json:"schemas,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost -// ControlSpec: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { - // AttributeType: 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]`. For example, `5D`, `3DT12H30M`, `T24H`. - AttributeType string `json:"attributeType,omitempty"` - // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` - // FieldName: The name of the field whose value will be used to determine the - // boost amount. - FieldName string `json:"fieldName,omitempty"` - // InterpolationType: 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 + // 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. "AttributeType") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec +func (s GoogleCloudDiscoveryengineV1betaListSchemasResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSchemasResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost -// ControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { - // AttributeValue: 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: 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 +// GoogleCloudDiscoveryengineV1betaListServingConfigsResponse: Response for +// ListServingConfigs method. +type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + // ServingConfigs: All the ServingConfigs for a given dataStore. + ServingConfigs []*GoogleCloudDiscoveryengineV1betaServingConfig `json:"servingConfigs,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. "AttributeValue") 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. "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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint +func (s GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListServingConfigsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint - 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 -} +// GoogleCloudDiscoveryengineV1betaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1betaListSessionsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + // Sessions: All the Sessions for a given data store. + Sessions []*GoogleCloudDiscoveryengineV1betaSession `json:"sessions,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A -// specification for configuring the behavior of content search. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { - // ChunkSpec: Specifies the chunk spec to be returned from the search response. - // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is - // set to CHUNKS - ChunkSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` - // ExtractiveContentSpec: If there is no extractive_content_spec provided, - // there will be no extractive answer in the search response. - ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` - // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. - // - // Possible values: - // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. - // "DOCUMENTS" - Returns documents in the search result. - // "CHUNKS" - Returns chunks in the search result. Only available if the - // DataStore.DocumentProcessingConfig.chunking_config is specified. - SearchResultMode string `json:"searchResultMode,omitempty"` - // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in - // the search response. - SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` - // SummarySpec: If `summarySpec` is not specified, summaries are not included - // in the search response. - SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkSpec") to + // 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. "ChunkSpec") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec +func (s GoogleCloudDiscoveryengineV1betaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSessionsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec: -// Specifies the chunk spec to be returned from the search response. Only -// available if the SearchRequest.ContentSearchSpec.search_result_mode is set -// to CHUNKS -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec struct { - // NumNextChunks: The number of next chunks to be returned of the current - // chunk. The maximum allowed value is 3. If not specified, no next chunks will - // be returned. - NumNextChunks int64 `json:"numNextChunks,omitempty"` - // NumPreviousChunks: The number of previous chunks to be returned of the - // current chunk. The maximum allowed value is 3. If not specified, no previous - // chunks will be returned. - NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumNextChunks") to +// GoogleCloudDiscoveryengineV1betaListTargetSitesResponse: Response message +// for SiteSearchEngineService.ListTargetSites method. +type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve the next + // page. If this field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // TargetSites: List of TargetSites. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` + // TotalSize: The total number of items matching the request. This will always + // be populated in the response. + 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. "NumNextChunks") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec +func (s GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListTargetSitesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveConte -// ntSpec: A specification for configuring the extractive content in a search -// response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { - // MaxExtractiveAnswerCount: The maximum number of extractive answers returned - // in each search result. An extractive answer is a verbatim answer extracted - // from the original document, which provides a precise and contextually - // relevant answer to the search query. If the number of matching answers is - // less than the `max_extractive_answer_count`, return all of the answers. - // Otherwise, return the `max_extractive_answer_count`. At most five answers - // are returned for each SearchResult. - MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` - // MaxExtractiveSegmentCount: The max number of extractive segments returned in - // each search result. Only applied if the DataStore is set to - // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is - // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from - // the original document that is relevant to the search query, and, in general, - // more verbose than an extractive answer. The segment could then be used as - // input for LLMs to generate summaries and answers. If the number of matching - // segments is less than `max_extractive_segment_count`, return all of the - // segments. Otherwise, return the `max_extractive_segment_count`. - MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` - // NumNextSegments: Return at most `num_next_segments` segments after each - // selected segments. - NumNextSegments int64 `json:"numNextSegments,omitempty"` - // NumPreviousSegments: Specifies whether to also include the adjacent from - // each selected segments. Return at most `num_previous_segments` segments - // before each selected segments. - NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` - // ReturnExtractiveSegmentScore: Specifies whether to return the confidence - // score from the extractive segments in each search result. This feature is - // available only for new or allowlisted data stores. To allowlist your data - // store, contact your Customer Engineer. The default value is `false`. - ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1betaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1betaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if applicable. + // For example, if the end user has finished 90 seconds of a playback video, + // then MediaInfo.media_progress_duration.seconds should be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` + // MediaProgressPercentage: Media progress should be computed using only the + // media_progress_duration relative to the media total length. This value must + // be between `[0, 1.0]` inclusive. If this is not a playback or the progress + // cannot be computed (e.g. ongoing livestream), this field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` + // ForceSendFields is a list of field names (e.g. "MediaProgressDuration") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // NullFields is a list of field names (e.g. "MediaProgressDuration") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec +func (s GoogleCloudDiscoveryengineV1betaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec: A -// specification for configuring snippets in a search response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { - // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet - // return, use `return_snippet` field. For backwards compatibility, we will - // return snippet if max_snippet_count > 0. - MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` - // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect - // on the snippet. - ReferenceOnly bool `json:"referenceOnly,omitempty"` - // ReturnSnippet: If `true`, then return snippet. If no snippet can be - // generated, we return "No snippet is available for this page." A - // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be - // returned. - ReturnSnippet bool `json:"returnSnippet,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to +func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} + +// GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1betaPageInfo struct { + // PageCategory: The most specific category associated with a category page. To + // represent full path of category, use '>' sign to separate different + // hierarchies. If '>' is part of the category name, replace it with other + // character(s). Category pages include special pages such as sales or + // promotions. For instance, a special sale page may have the category + // hierarchy: "pageCategory" : "Sales > 2017 Black Friday Deals". Required + // for `view-category-page` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageCategory string `json:"pageCategory,omitempty"` + // PageviewId: A unique ID of a web page view. This should be kept the same for + // all user events triggered from the same pageview. For example, an item + // detail page view could trigger multiple events as the user is browsing the + // page. The `pageview_id` property should be kept the same for all these + // events so that they can be grouped together properly. When using the client + // side event reporting with JavaScript pixel and Google Tag Manager, this + // value is filled in automatically. + PageviewId string `json:"pageviewId,omitempty"` + // ReferrerUri: The referrer URL of the current page. When using the client + // side event reporting with JavaScript pixel and Google Tag Manager, this + // value is filled in automatically. However, some browser privacy restrictions + // may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` + // Uri: Complete URL (window.location.href) of the user's current page. When + // using the client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. Maximum length 5,000 + // characters. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageCategory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSnippetCount") 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. "PageCategory") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec +func (s GoogleCloudDiscoveryengineV1betaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPageInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec: A -// specification for configuring a summary returned in a search response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { - // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. - // The default value is `false`. Google employs search-query classification to - // detect adversarial queries. No summary is returned if the search query is - // classified as an adversarial query. For example, a user might ask a question - // regarding negative comments about the company or submit a query designed to - // generate unsafe, policy-violating output. If this field is set to `true`, we - // skip generating summaries for adversarial queries and return fallback - // messages instead. - IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that - // are not summary-seeking. The default value is `false`. Google employs - // search-query classification to detect summary-seeking queries. No summary is - // returned if the search query is classified as a non-summary seeking query. - // For example, `why is the sky blue` and `Who is the best soccer player in the - // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` - // are not. They are most likely navigational queries. If this field is set to - // `true`, we skip generating summaries for non-summary seeking queries and - // return fallback messages instead. - IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - // IncludeCitations: Specifies whether to include citations in the summary. The - // default value is `false`. When this field is set to `true`, summaries - // include in-line citation numbers. Example summary including citations: - // BigQuery is Google Cloud's fully managed and completely serverless - // enterprise data warehouse [1]. BigQuery supports all data types, works - // across clouds, and has built-in machine learning and business intelligence, - // all within a unified platform [2, 3]. The citation numbers refer to the - // returned search results and are 1-indexed. For example, [1] means that the - // sentence is attributed to the first search result. [2, 3] means that the - // sentence is attributed to both the second and third search results. - IncludeCitations bool `json:"includeCitations,omitempty"` - // LanguageCode: Language code for Summary. Use language tags defined by BCP47 - // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an - // experimental feature. - LanguageCode string `json:"languageCode,omitempty"` - // ModelPromptSpec: If specified, the spec will be used to modify the prompt - // provided to the LLM. - ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` - // ModelSpec: If specified, the spec will be used to modify the model - // specification provided to the LLM. - ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` - // SummaryResultCount: The number of top results to generate the summary from. - // If the number of results returned is less than `summaryResultCount`, the - // summary is generated from all of the results. At most 10 results for - // documents mode, or 50 for chunks mode, can be used to generate a summary. - // The chunks mode is used when - // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. - SummaryResultCount int64 `json:"summaryResultCount,omitempty"` - // UseSemanticChunks: If true, answer will be generated from most relevant - // chunks from top search results. This feature will improve summary quality. - // Note that with this feature enabled, not all top search results will be - // referenced and included in the reference list, so the citation source index - // only points to the search results listed in the reference list. - UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to +// GoogleCloudDiscoveryengineV1betaPanelInfo: Detailed panel information +// associated with a user event. +type GoogleCloudDiscoveryengineV1betaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` + // PanelPosition: The ordered position of the panel, if shown to the user with + // other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` + // TotalPanels: The total number of panels, including this one, shown to the + // user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` + // 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. "IgnoreAdversarialQuery") 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. "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 GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec +func (s GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPanelInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode -// lPromptSpec: Specification of the prompt to use with the model. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { - // Preamble: Text at the beginning of the prompt that instructs the assistant. - // Examples are available in the user guide. - Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preamble") to +// GoogleCloudDiscoveryengineV1betaPauseEngineRequest: Request for pausing +// training of an engine. +type GoogleCloudDiscoveryengineV1betaPauseEngineRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1betaProject struct { + // CreateTime: Output only. The timestamp when this project is created. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,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. "Preamble") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec +func (s GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProject return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode -// lSpec: Specification of the model. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { - // Version: The model version used to generate the summary. Supported values - // are: * `stable`: string. Default value when no value is specified. Uses a - // generally available, fine-tuned model. For more information, see Answer - // generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). - // * `preview`: string. (Public preview) Uses a preview model. For more - // information, see Answer generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). +// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the +// terms of service. +type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "Version") 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. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Version") to include in API + // NullFields is a list of field names (e.g. "AcceptTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec +func (s GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct to -// define data stores to filter on in a search call and configurations for -// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. -type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { - // DataStore: Required. Full resource name of DataStore, such as - // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor - // es/{data_store_id}`. - DataStore string `json:"dataStore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to +// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata +// associated with a project provision operation. +type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectRequest: Request for +// ProjectService.ProvisionProject method. +type GoogleCloudDiscoveryengineV1betaProvisionProjectRequest struct { + // AcceptDataUseTerms: Required. Set to `true` to specify that caller has read + // and would like to give consent to the Terms for data use + // (https://cloud.google.com/retail/data-use-terms). + AcceptDataUseTerms bool `json:"acceptDataUseTerms,omitempty"` + // DataUseTermsVersion: Required. The version of the Terms for data use + // (https://cloud.google.com/retail/data-use-terms) that caller has read and + // would like to give consent to. Acceptable version is `2022-11-23`, and this + // may change over time. + DataUseTermsVersion string `json:"dataUseTermsVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptDataUseTerms") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") 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. "AcceptDataUseTerms") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec +func (s GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProvisionProjectRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The -// specification that uses customized query embedding vector to do semantic -// document retrieval. -type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { - // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. - EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` - // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to +// GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest: Request +// message for CompletionService.PurgeCompletionSuggestions method. +type GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to +// the progress of the PurgeDocuments operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // 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. "EmbeddingVectors") 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. "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 GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec +func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector: -// Embedding vector. -type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { - // FieldPath: Embedding field path in schema. - FieldPath string `json:"fieldPath,omitempty"` - // Vector: Query embedding vector. - Vector []float64 `json:"vector,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest: Request message for +// DocumentService.PurgeDocuments method. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest struct { + // Filter: Required. Filter matching documents to purge. Only currently + // supported value is `*` (all items). + Filter string `json:"filter,omitempty"` + // Force: Actually performs the purge. If `force` is set to false, return the + // expected purge count without deleting any documents. + Force bool `json:"force,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in API + // NullFields is a list of field names (e.g. "Filter") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector +func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector - var s1 struct { - Vector []gensupport.JSONFloat64 `json:"vector"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Vector = make([]float64, len(s1.Vector)) - for i := range s1.Vector { - s.Vector[i] = float64(s1.Vector[i]) - } - return nil -} - -// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet -// specification to perform faceted search. -type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { - // EnableDynamicPosition: Enables dynamic position for this facet. If set to - // true, the position of this facet among all facets in the response is - // determined automatically. If dynamic facets are enabled, it is ordered - // together. If set to false, the position of this facet in the response is the - // same as in the request, and it is ranked before the facets with dynamic - // position enable and all dynamic facets. For example, you may always want to - // have rating facet returned in the response, but it's not necessarily to - // always display the rating facet at the top. In that case, you can set - // enable_dynamic_position to true so that the position of rating facet in - // response is determined automatically. Another example, assuming you have the - // following facets in the request: * "rating", enable_dynamic_position = true - // * "price", enable_dynamic_position = false * "brands", - // enable_dynamic_position = false And also you have a dynamic facets enabled, - // which generates a facet `gender`. Then the final order of the facets in the - // response can be ("price", "brands", "rating", "gender") or ("price", - // "brands", "gender", "rating") depends on how API orders "gender" and - // "rating" facets. However, notice that "price" and "brands" are always ranked - // at first and second position because their enable_dynamic_position is false. - EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - // ExcludedFilterKeys: List of keys to exclude when faceting. By default, - // FacetKey.key is not excluded from the filter unless it is listed in this - // field. Listing a facet key in this field allows its values to appear as - // facet results, even when they are filtered out of search results. Using this - // field does not affect what search results are returned. For example, suppose - // there are 100 documents with the color facet "Red" and 200 documents with - // the color facet "Blue". A query containing the filter "color:ANY("Red")" and - // having "color" as FacetKey.key would by default return only "Red" documents - // in the search results, and also return "Red" with count 100 as the only - // color facet. Although there are also blue documents available, "Blue" would - // not be shown as an available facet value. If "color" is listed in - // "excludedFilterKeys", then the query returns the facet values "Red" with - // count 100 and "Blue" with count 200, because the "color" key is now excluded - // from the filter. Because this field doesn't affect search results, the - // search results are still correctly filtered to return only "Red" documents. - // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error - // is returned. - ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` - // FacetKey: Required. The facet key specification. - FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` - // Limit: Maximum facet values that are returned for this facet. If - // unspecified, defaults to 20. The maximum allowed value is 300. Values above - // 300 are coerced to 300. For aggregation in healthcare search, when the - // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden - // to 10,000 internally, regardless of the value set here. If this field is - // negative, an `INVALID_ARGUMENT` is returned. - Limit int64 `json:"limit,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for +// DocumentService.PurgeDocuments method. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + // PurgeSample: A sample of document names that will be deleted. Only populated + // if `force` is set to false. A max of 100 names will be returned and the + // names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + // ForceSendFields is a list of field names (e.g. "PurgeCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableDynamicPosition") 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. "PurgeCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec +func (s GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: Specifies -// how a facet is computed. -type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { - // CaseInsensitive: True to make facet keys case insensitive when getting - // faceting values with prefixes or contains; false otherwise. - CaseInsensitive bool `json:"caseInsensitive,omitempty"` - // Contains: Only get facet values that contain the given strings. For example, - // suppose "category" has three values "Action > 2022", "Action > 2021" and - // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only - // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual - // fields. Maximum is 10. - Contains []string `json:"contains,omitempty"` - // Intervals: Set only if values should be bucketed into intervals. Must be set - // for facets with numerical values. Must not be set for facet with text - // values. Maximum number of intervals is 30. - Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` - // Key: Required. Supported textual and numerical facet keys in Document - // object, over which the facet values are computed. Facet key is - // case-sensitive. - Key string `json:"key,omitempty"` - // OrderBy: The order in which documents are returned. Allowed values are: * - // "count desc", which means order by SearchResponse.Facet.values.count - // descending. * "value desc", which means order by - // SearchResponse.Facet.values.value descending. Only applies to textual - // facets. If not set, textual values are sorted in natural order - // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are - // sorted in the order given by FacetSpec.FacetKey.intervals. - OrderBy string `json:"orderBy,omitempty"` - // Prefixes: Only get facet values that start with the given string prefix. For - // example, suppose "category" has three values "Action > 2022", "Action > - // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" - // facet only contains "Action > 2022" and "Action > 2021". Only supported on - // textual fields. Maximum is 10. - Prefixes []string `json:"prefixes,omitempty"` - // RestrictedValues: Only get facet for the given restricted values. Only - // supported on textual fields. For example, suppose "category" has three - // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set - // "restricted_values" to "Action > 2022", the "category" facet only contains - // "Action > 2022". Only supported on textual fields. Maximum is 10. - RestrictedValues []string `json:"restrictedValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: +// Metadata related to the progress of the PurgeSuggestionDenyListEntries +// operation. This is returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata 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. "CaseInsensitive") 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. "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 GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey +func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies the image -// query input. -type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { - // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, - // and BMP. - ImageBytes string `json:"imageBytes,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImageBytes") to +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest: +// Request message for CompletionService.PurgeSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse: +// Response message for CompletionService.PurgeSuggestionDenyListEntries +// method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // PurgeCount: Number of suggestion deny list entries purged. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImageBytes") to include in API + // NullFields is a list of field names (e.g. "ErrorSamples") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery +func (s GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandin -// gSpec: Specification to enable natural language understanding capabilities -// for search requests. -type GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { - // FilterExtractionCondition: The condition under which filter extraction - // should occur. Default to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disables NL filter extraction. - // "ENABLED" - Enables NL filter extraction. - FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` - // GeoSearchQueryDetectionFieldNames: Field names used for location-based - // filtering, where geolocation filters are detected in natural language search - // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. - // If this field is set, it overrides the field names set in - // Servingconfig.geo_search_query_detection_field_names. - GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` - // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaQualityMetrics: Describes the metrics +// produced by the evaluation. +type GoogleCloudDiscoveryengineV1betaQualityMetrics struct { + // DocNdcg: Normalized discounted cumulative gain (NDCG) per document, at + // various top-k cutoff levels. NDCG measures the ranking quality, giving + // higher relevance to top results. Example (top-3): Suppose SampleQuery with + // three retrieved documents (D1, D2, D3) and binary relevance judgements (1 + // for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] + // Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each SampleQuery: * + // DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: + // 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + DocNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docNdcg,omitempty"` + // DocPrecision: Precision per document, at various top-k cutoff levels. + // Precision is the fraction of retrieved documents that are relevant. Example + // (top-5): * For a single SampleQuery, If 4 out of 5 retrieved documents in + // the top-5 are relevant, precision@5 = 4/5 = 0.8 + DocPrecision *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docPrecision,omitempty"` + // DocRecall: Recall per document, at various top-k cutoff levels. Recall is + // the fraction of relevant documents retrieved out of all relevant documents. + // Example (top-5): * For a single SampleQuery, If 3 out of 5 relevant + // documents are retrieved in the top-5, recall@5 = 3/5 = 0.6 + DocRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"docRecall,omitempty"` + // PageNdcg: Normalized discounted cumulative gain (NDCG) per page, at various + // top-k cutoff levels. NDCG measures the ranking quality, giving higher + // relevance to top results. Example (top-3): Suppose SampleQuery with three + // retrieved pages (P1, P2, P3) and binary relevance judgements (1 for + // relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: + // [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for SampleQuery: * DCG@3: + // 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + + // 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693 + PageNdcg *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageNdcg,omitempty"` + // PageRecall: Recall per page, at various top-k cutoff levels. Recall is the + // fraction of relevant pages retrieved out of all relevant pages. Example + // (top-5): * For a single SampleQuery, if 3 out of 5 relevant pages are + // retrieved in the top-5, recall@5 = 3/5 = 0.6 + PageRecall *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics `json:"pageRecall,omitempty"` + // ForceSendFields is a list of field names (e.g. "DocNdcg") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FilterExtractionCondition") 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. "DocNdcg") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec +func (s GoogleCloudDiscoveryengineV1betaQualityMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetrics return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: -// Specification to determine under which conditions query expansion should -// occur. -type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { - // Condition: The condition under which query expansion should occur. Default - // to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this - // case, server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disabled query expansion. Only the exact search query is - // used, even if SearchResponse.total_size is zero. - // "AUTO" - Automatic query expansion built by the Search API. - Condition string `json:"condition,omitempty"` - // PinUnexpandedResults: Whether to pin unexpanded results. If this field is - // set to true, unexpanded products are always at the top of the search - // results, followed by the expanded results. - PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics: Stores the metric +// values at specific top-k levels. +type GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics struct { + // Top1: The top-1 value. + Top1 float64 `json:"top1,omitempty"` + // Top10: The top-10 value. + Top10 float64 `json:"top10,omitempty"` + // Top3: The top-3 value. + Top3 float64 `json:"top3,omitempty"` + // Top5: The top-5 value. + Top5 float64 `json:"top5,omitempty"` + // ForceSendFields is a list of field names (e.g. "Top1") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API + // NullFields is a list of field names (e.g. "Top1") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaQualityMetricsTopkMetrics + var s1 struct { + Top1 gensupport.JSONFloat64 `json:"top1"` + Top10 gensupport.JSONFloat64 `json:"top10"` + Top3 gensupport.JSONFloat64 `json:"top3"` + Top5 gensupport.JSONFloat64 `json:"top5"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Top1 = float64(s1.Top1) + s.Top10 = float64(s1.Top10) + s.Top3 = float64(s1.Top3) + s.Top5 = float64(s1.Top5) + return nil +} + +// GoogleCloudDiscoveryengineV1betaQuery: Defines a user inputed query. +type GoogleCloudDiscoveryengineV1betaQuery struct { + // QueryId: Unique Id for the query. + QueryId string `json:"queryId,omitempty"` + // Text: Plain text. + Text string `json:"text,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QueryId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec +func (s GoogleCloudDiscoveryengineV1betaQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec: -// Specification for search as you type in search requests. -type GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec struct { - // Condition: The condition under which search as you type should occur. - // Default to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disables Search As You Type. - // "ENABLED" - Enables Search As You Type. - Condition string `json:"condition,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaRankRequest: Request message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankRequest struct { + // IgnoreRecordDetailsInResponse: If true, the response will contain only + // record ID and score. By default, it is false, the response will contain + // record details. + IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` + // Model: The identifier of the model to use. It is one of: * + // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + // token size 512. It is set to `semantic-ranker-512@latest` by default if + // unspecified. + Model string `json:"model,omitempty"` + // Query: The query to use. + Query string `json:"query,omitempty"` + // Records: Required. A list of records to rank. At most 200 records to rank. + Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` + // TopN: The number of results to return. If this is unset or no bigger than + // zero, returns all results. + TopN int64 `json:"topN,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "IgnoreRecordDetailsInResponse") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IgnoreRecordDetailsInResponse") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaRankRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaRankResponse: Response message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankResponse struct { + // Records: A list of records sorted by descending score. + Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Records") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API + // NullFields is a list of field names (e.g. "Records") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec +func (s GoogleCloudDiscoveryengineV1betaRankResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec: Session -// specification. Multi-turn Search feature is currently at private GA stage. -// Please use v1alpha or v1beta version instead before we launch this feature -// to public GA. Or ask for allowlisting through Google Support team. -type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { - // QueryId: If set, the search result gets stored to the "turn" specified by - // this query ID. Example: Let's say the session looks like this: session { - // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: - // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How - // about bar then?" query_id: ".../questions/zzz" } } } The user can call - // /search API with a request like this: session: ".../sessions/xxx" - // session_spec { query_id: ".../questions/zzz" } Then, the API stores the - // search result, associated with the last turn. The stored search result can - // be used by a subsequent /answer API call (with the session ID and the query - // ID specified). Also, it is possible to call /search and /answer in parallel - // with the same session ID & query ID. - QueryId string `json:"queryId,omitempty"` - // SearchResultPersistenceCount: The number of top search results to persist. - // The persisted search results can be used for the subsequent /answer api - // call. This field is simliar to the `summary_result_count` field in - // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 - // results for documents mode, or 50 for chunks mode. - SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally +// GoogleCloudDiscoveryengineV1betaRankingRecord: Record message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankingRecord struct { + // Content: The content of the record. Empty by default. At least one of title + // or content should be set otherwise an INVALID_ARGUMENT error is thrown. + Content string `json:"content,omitempty"` + // Id: The unique ID to represent the record. + Id string `json:"id,omitempty"` + // Score: The score of this record based on the given query and selected model. + Score float64 `json:"score,omitempty"` + // Title: The title of the record. Empty by default. At least one of title or + // content should be set otherwise an INVALID_ARGUMENT error is thrown. + Title string `json:"title,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. "QueryId") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec +func (s GoogleCloudDiscoveryengineV1betaRankingRecord) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The -// specification for query spell correction. -type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { - // Mode: The mode under which spell correction replaces the original search - // query. Defaults to Mode.AUTO. - // - // Possible values: - // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, - // server behavior defaults to Mode.AUTO. - // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a - // suggestion is found, it is put in the SearchResponse.corrected_query. The - // spelling suggestion won't be used as the search query. - // "AUTO" - Automatic spell correction built by the Search API. Search will - // be based on the corrected query if found. - Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally +func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord + 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 +} + +// GoogleCloudDiscoveryengineV1betaRecommendRequest: Request message for +// Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length limit of + // 5,000 characters. Currently, only filter expressions on the `filter_tags` + // attribute is supported. Examples: * `(filter_tags: ANY("Red", "Blue") OR + // filter_tags: ANY("Hot", "Cold"))` * `(filter_tags: ANY("Red", "Blue")) AND + // NOT (filter_tags: ANY("Green"))` If `attributeFilteringSyntax` is set to + // true under the `params` field, then attribute-based expressions are expected + // instead of the above described tag-based syntax. Examples: * (launguage: + // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: true) AND + // (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) If your filter + // blocks all results, the API returns generic (unfiltered) popular Documents. + // If you only want results strictly matching the filters, set + // `strictFiltering` to `true` in RecommendRequest.params to receive empty + // results instead. Note that the API never returns Documents with + // `storageStatus` as `EXPIRED` or `DELETED` regardless of filter choices. + Filter string `json:"filter,omitempty"` + // PageSize: Maximum number of results to return. Set this property to the + // number of recommendation results needed. If zero, the service chooses a + // reasonable default. The maximum allowed value is 100. Values above 100 are + // set to 100. + PageSize int64 `json:"pageSize,omitempty"` + // Params: Additional domain specific parameters for the recommendations. + // Allowed values: * `returnDocument`: Boolean. If set to `true`, the + // associated Document object is returned in + // RecommendResponse.RecommendationResult.document. * `returnScore`: Boolean. + // If set to true, the recommendation score corresponding to each returned + // Document is set in RecommendResponse.RecommendationResult.metadata. The + // given score indicates the probability of a Document conversion given the + // user's context and history. * `strictFiltering`: Boolean. True by default. + // If set to `false`, the service returns generic (unfiltered) popular + // Documents instead of empty if your filter blocks all recommendation results. + // * `diversityLevel`: String. Default empty. If set to be non-empty, then it + // needs to be one of: * `no-diversity` * `low-diversity` * `medium-diversity` + // * `high-diversity` * `auto-diversity` This gives request-level control and + // adjusts recommendation results based on Document category. * + // `attributeFilteringSyntax`: Boolean. False by default. If set to true, the + // `filter` field is interpreted according to the new, attribute-based syntax. + Params googleapi.RawMessage `json:"params,omitempty"` + // UserEvent: Required. Context about the user, what they are looking at and + // what action they took to trigger the Recommend request. Note that this user + // event detail won't be ingested to userEvent logs. Thus, a separate userEvent + // write request is required for event logging. Don't set + // UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the same fixed ID + // for different users. If you are trying to receive non-personalized + // recommendations (not recommended; this can negatively impact model + // performance), instead set UserEvent.user_pseudo_id to a random unique ID and + // leave UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvent,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Requirements for labels + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // ValidateOnly: Use validate only mode for this recommendation query. If set + // to `true`, a fake model is used that returns arbitrary Document IDs. Note + // that the validate only mode should only be used for testing the API, or if + // the model is not ready. + ValidateOnly bool `json:"validateOnly,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") 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. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec +func (s GoogleCloudDiscoveryengineV1betaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponse: Response message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1betaSearchResponse struct { - // AppliedControls: Controls applied as part of the Control service. - 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. +// GoogleCloudDiscoveryengineV1betaRecommendResponse: Response message for +// Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included in the + // UserEvent logs resulting from this recommendation, which enables accurate + // attribution of recommendation model performance. 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 - // corrected_query. Otherwise the original query is used for search. - CorrectedQuery string `json:"correctedQuery,omitempty"` - // Facets: Results of facets requested by user. - Facets []*GoogleCloudDiscoveryengineV1betaSearchResponseFacet `json:"facets,omitempty"` - GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` - // GuidedSearchResult: Guided search result. - GuidedSearchResult *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - // NaturalLanguageQueryUnderstandingInfo: Natural language query understanding - // information for the returned results. - NaturalLanguageQueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo `json:"naturalLanguageQueryUnderstandingInfo,omitempty"` - // NextPageToken: A token that can be sent as SearchRequest.page_token to - // retrieve the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - // QueryExpansionInfo: Query expansion information for the returned results. - QueryExpansionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` - // RedirectUri: The URI of a customer-defined redirect page. If redirect action - // is triggered, no search is performed, and only redirect_uri and - // attribution_token are set in the response. - RedirectUri string `json:"redirectUri,omitempty"` - // Results: A list of matched documents. The order represents the ranking. - Results []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"results,omitempty"` - // SessionInfo: Session information. Only set if SearchRequest.session is - // provided. See its description for more details. - SessionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo `json:"sessionInfo,omitempty"` - // Summary: A summary as part of the search results. This field is only - // returned if SearchRequest.ContentSearchSpec.summary_spec is set. - Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` - // TotalSize: The estimated total count of matched items irrespective of - // pagination. The count of results returned by pagination may be less than the - // total_size that matches. - TotalSize int64 `json:"totalSize,omitempty"` + // MissingIds: IDs of documents in the request that were missing from the + // default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` + // Results: A list of recommended Documents. The order represents the ranking + // (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult `json:"results,omitempty"` + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AppliedControls") to + // ForceSendFields is a list of field names (e.g. "AttributionToken") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppliedControls") to include in + // NullFields is a list of field names (e.g. "AttributionToken") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponse +func (s GoogleCloudDiscoveryengineV1betaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseFacet: A facet result. -type GoogleCloudDiscoveryengineV1betaSearchResponseFacet struct { - // DynamicFacet: Whether the facet is dynamically generated. - DynamicFacet bool `json:"dynamicFacet,omitempty"` - // Key: The key for this facet. For example, "colors" or "price". It - // matches SearchRequest.FacetSpec.FacetKey.key. - Key string `json:"key,omitempty"` - // Values: The facet values for this field. - Values []*GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "DynamicFacet") to +// GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult: +// RecommendationResult represents a generic recommendation result with +// associated metadata. +type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` + // Metadata: Additional Document metadata or annotations. Possible values: * + // `score`: Recommendation score in double value. Is set if `returnScore` is + // set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DynamicFacet") to include in API + // NullFields is a list of field names (e.g. "Document") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseFacet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacet +func (s GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue: A facet value -// which contains value names and their count. -type GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue struct { - // Count: Number of items that have this facet value. - Count int64 `json:"count,omitempty,string"` - // Interval: Interval value for a facet, such as 10, 20) for facet "price". It - // matches [SearchRequest.FacetSpec.FacetKey.intervals. - Interval *GoogleCloudDiscoveryengineV1betaInterval `json:"interval,omitempty"` - // Value: Text value of a facet, such as "Black" for facet "colors". - Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Count") to unconditionally +// GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest: Request message for +// SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { + // Uris: Required. List of URIs to crawl. At most 10K URIs are supported, + // otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at + // least one TargetSite in `site_search_engine`. + Uris []string `json:"uris,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Uris") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue +func (s GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo: Debug -// information specifically related to forward geocoding issues arising from -// Geolocation Search. -type GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo struct { - // ErrorMessage: The error produced. - ErrorMessage string `json:"errorMessage,omitempty"` - // OriginalAddressQuery: The address from which forward geocoding ingestion - // produced issues. - OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorMessage") to +// GoogleCloudDiscoveryengineV1betaReply: Defines a reply message to user. +type GoogleCloudDiscoveryengineV1betaReply struct { + // References: References in the reply. + References []*GoogleCloudDiscoveryengineV1betaReplyReference `json:"references,omitempty"` + // Reply: DEPRECATED: use `summary` instead. Text reply. + Reply string `json:"reply,omitempty"` + // Summary: Summary based on search results. + Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` + // ForceSendFields is a list of field names (e.g. "References") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorMessage") to include in API + // NullFields is a list of field names (e.g. "References") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo +func (s GoogleCloudDiscoveryengineV1betaReply) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaReply return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult: Guided -// search result. The guided search helps user to refine the search results and -// narrow down to the real needs from a broaded search results. -type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult struct { - // FollowUpQuestions: Suggested follow-up questions. - FollowUpQuestions []string `json:"followUpQuestions,omitempty"` - // RefinementAttributes: A list of ranked refinement attributes. - RefinementAttributes []*GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") to +// GoogleCloudDiscoveryengineV1betaReplyReference: Defines reference in reply. +type GoogleCloudDiscoveryengineV1betaReplyReference struct { + // AnchorText: Anchor text. + AnchorText string `json:"anchorText,omitempty"` + // End: Anchor text end index. + End int64 `json:"end,omitempty"` + // Start: Anchor text start index. + Start int64 `json:"start,omitempty"` + // Uri: URI link reference. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "AnchorText") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FollowUpQuestions") 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. "AnchorText") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult +func (s GoogleCloudDiscoveryengineV1betaReplyReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaReplyReference return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAtt -// ribute: Useful attribute for search result refinements. -type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute struct { - // AttributeKey: Attribute key used to refine the results. For example, - // "movie_type". - AttributeKey string `json:"attributeKey,omitempty"` - // AttributeValue: Attribute value used to refine the results. For example, - // "drama". - AttributeValue string `json:"attributeValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributeKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeKey") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfo: Information describing what natural language understanding was done -// on the input query. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo struct { - // ExtractedFilters: The filters that were extracted from the input query. - ExtractedFilters string `json:"extractedFilters,omitempty"` - // RewrittenQuery: Rewritten input query minus the extracted filters. - RewrittenQuery string `json:"rewrittenQuery,omitempty"` - // StructuredExtractedFilter: The filters that were extracted from the input - // query represented in a structured form. - StructuredExtractedFilter *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter `json:"structuredExtractedFilter,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExtractedFilters") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExtractedFilters") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilter: The filters that were extracted from the -// input query represented in a structured form. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter struct { - // Expression: The expression denoting the filter that was extracted from the - // input query in a structured form. It can be a simple expression denoting a - // single string, numerical or geolocation constraint or a compound expression - // which is a combination of multiple expressions connected using logical (OR - // and AND) operators. - Expression *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expression,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expression") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Expression") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// GoogleCloudDiscoveryengineV1betaResumeEngineRequest: Request for resuming +// training of an engine. +type GoogleCloudDiscoveryengineV1betaResumeEngineRequest struct { } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} +// GoogleCloudDiscoveryengineV1betaSampleQuery: Sample Query captures metadata +// to be used for evaluation. +type GoogleCloudDiscoveryengineV1betaSampleQuery struct { + // CreateTime: Output only. Timestamp the SampleQuery was created at. + CreateTime string `json:"createTime,omitempty"` + // Name: Immutable. The full resource name of the sample query, in the format + // of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/sam + // pleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string with a + // length limit of 1024 characters. + Name string `json:"name,omitempty"` + // QueryEntry: The query entry. + QueryEntry *GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry `json:"queryEntry,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterAndExpression: Logical `And` operator. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression struct { - // Expressions: The expressions that were ANDed together. - Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expressions") to + // 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. "Expressions") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression +func (s GoogleCloudDiscoveryengineV1betaSampleQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSampleQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterExpression: The expression denoting the -// filter that was extracted from the input query. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression struct { - // AndExpr: Logical "And" compound operator connecting multiple expressions. - AndExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression `json:"andExpr,omitempty"` - // GeolocationConstraint: Geolocation constraint expression. - GeolocationConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint `json:"geolocationConstraint,omitempty"` - // NumberConstraint: Numerical constraint expression. - NumberConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint `json:"numberConstraint,omitempty"` - // OrExpr: Logical "Or" compound operator connecting multiple expressions. - OrExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression `json:"orExpr,omitempty"` - // StringConstraint: String constraint expression. - StringConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint `json:"stringConstraint,omitempty"` - // ForceSendFields is a list of field names (e.g. "AndExpr") to unconditionally +// GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry: Query Entry captures +// metadata to be used for search evaluation. +type GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry struct { + // Query: Required. The query. + Query string `json:"query,omitempty"` + // Targets: List of targets for the query. + Targets []*GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget `json:"targets,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AndExpr") to include in API + // NullFields is a list of field names (e.g. "Query") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression +func (s GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntry return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterGeolocationConstraint: Constraint of a -// geolocation field. Name of the geolocation field as defined in the schema. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint struct { - // Address: The reference address that was inferred from the input query. The - // proximity of the reference address to the geolocation field will be used to - // filter the results. - Address string `json:"address,omitempty"` - // FieldName: The name of the geolocation field as defined in the schema. - FieldName string `json:"fieldName,omitempty"` - // RadiusInMeters: The radius in meters around the address. The record is - // returned if the location of the geolocation field is within the radius. - RadiusInMeters float64 `json:"radiusInMeters,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 +// GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget: Defines the +// parameters of the query's expected outcome. +type GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget struct { + // PageNumbers: Expected page numbers of the target. Each page number must be + // non negative. + PageNumbers []int64 `json:"pageNumbers,omitempty"` + // Score: Relevance score of the target. + Score float64 `json:"score,omitempty"` + // Uri: Expected uri of the target. This field must be a UTF-8 encoded string + // with a length limit of 2048 characters. Example of valid uris: + // `https://example.com/abc`, `gcs://example/example.pdf`. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "PageNumbers") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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. "PageNumbers") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint +func (s GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint +func (s *GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSampleQueryQueryEntryTarget var s1 struct { - RadiusInMeters gensupport.JSONFloat64 `json:"radiusInMeters"` + Score gensupport.JSONFloat64 `json:"score"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.RadiusInMeters = float64(s1.RadiusInMeters) + s.Score = float64(s1.Score) return nil } -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterNumberConstraint: Constraint expression of a -// number field. Example: price < 100. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint struct { - // Comparison: The comparison operation performed between the field value and - // the value specified in the constraint. - // - // Possible values: - // "COMPARISON_UNSPECIFIED" - Undefined comparison operator. - // "EQUALS" - Denotes equality `=` operator. - // "LESS_THAN_EQUALS" - Denotes less than or equal to `<=` operator. - // "LESS_THAN" - Denotes less than `<` operator. - // "GREATER_THAN_EQUALS" - Denotes greater than or equal to `>=` operator. - // "GREATER_THAN" - Denotes greater than `>` operator. - Comparison string `json:"comparison,omitempty"` - // FieldName: Name of the numerical field as defined in the schema. - FieldName string `json:"fieldName,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 +// GoogleCloudDiscoveryengineV1betaSampleQuerySet: A SampleQuerySet is the +// parent resource of SampleQuery, and contains the configurations shared by +// all SampleQuery under it. +type GoogleCloudDiscoveryengineV1betaSampleQuerySet struct { + // CreateTime: Output only. Timestamp the SampleQuerySet was created at. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the SampleQuerySet. + Description string `json:"description,omitempty"` + // DisplayName: Required. The sample query set display name. This field must be + // a UTF-8 encoded string with a length limit of 128 characters. + DisplayName string `json:"displayName,omitempty"` + // Name: Immutable. The full resource name of the SampleQuerySet, in the format + // of + // `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + 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. "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. "Comparison") to include in API + // 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 GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint +func (s GoogleCloudDiscoveryengineV1betaSampleQuerySet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSampleQuerySet return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint - 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 -} +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and layout of +// a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + // Name: Immutable. The full resource name of the schema, in the format of + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterOrExpression: Logical `Or` operator. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression struct { - // Expressions: The expressions that were ORed together. - Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expressions") to + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "JsonSchema") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Expressions") to include in API + // NullFields is a list of field names (e.g. "JsonSchema") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression +func (s GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi -// ngInfoStructuredExtractedFilterStringConstraint: Constraint expression of a -// string field. -type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { - // FieldName: Name of the string field as defined in the schema. - FieldName string `json:"fieldName,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"` - // ForceSendFields is a list of field names (e.g. "FieldName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchInfo: Detailed search information. +type GoogleCloudDiscoveryengineV1betaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination (the + // 0-indexed starting location, amongst the products deemed by the API as + // relevant). See SearchRequest.offset for definition. If this field is + // negative, an `INVALID_ARGUMENT` is returned. This can only be set for + // `search` events. Other event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a UTF-8 + // encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This can only be set for `search` + // events. Other event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + OrderBy string `json:"orderBy,omitempty"` + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length limit of + // 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is returned. At + // least one of search_query or PageInfo.page_category is required for `search` + // events. Other event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + SearchQuery string `json:"searchQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "Offset") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldName") to include in API + // NullFields is a list of field names (e.g. "Offset") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint +func (s GoogleCloudDiscoveryengineV1betaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo: -// Information describing query expansion including whether expansion has -// occurred. -type GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo struct { - // ExpandedQuery: Bool describing whether query expansion has occurred. - ExpandedQuery bool `json:"expandedQuery,omitempty"` - // PinnedResultCount: Number of pinned results. This field will only be set - // when expansion happens and - // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. - PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to +// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/branches/0`. Use `default_branch` as the branch ID or leave + // this field empty, to search documents under the default branch. + Branch string `json:"branch,omitempty"` + // CanonicalFilter: The default filter that is applied when a user performs a + // search without checking any filters on the search page. The filter applied + // to every search request when quality improvement such as query expansion is + // needed. In the case a query does not have a sufficient amount of results + // this filter will be used to determine whether or not to enable the query + // expansion flow. The original filter will still be used for the query + // expanded search. This field is strongly recommended to achieve high search + // quality. For more information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of content + // search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not provided, it + // will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + // FacetSpecs: Facet specifications for faceted search. If empty, no facets are + // returned. A maximum of 100 values are allowed. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI + // Search is done by mapping the LHS filter key to a key property defined in + // the Vertex AI Search backend -- this mapping is defined by the customer in + // their schema. For example a media customer might have a field 'name' in + // their schema. In this case the filter would look like this: filter --> + // name:'ANY("king kong")' For more information about filtering including + // syntax and filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // LanguageCode: The BCP-47 language code, such as "en-US" or "sr-Latn". For + // more information, see Standard fields + // (https://cloud.google.com/apis/design/standard_fields). This field helps to + // better interpret the query. If a value isn't specified, the query language + // code is automatically detected, which may not be accurate. + LanguageCode string `json:"languageCode,omitempty"` + // NaturalLanguageQueryUnderstandingSpec: If + // `naturalLanguageQueryUnderstandingSpec` is not specified, no additional + // natural language query understanding will be done. + NaturalLanguageQueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec `json:"naturalLanguageQueryUnderstandingSpec,omitempty"` + // Offset: A 0-indexed integer that specifies the current offset (that is, + // starting result location, amongst the Documents deemed by the API as + // relevant) in search results. This field is only considered if page_token is + // unset. If this field is negative, an `INVALID_ARGUMENT` is returned. + Offset int64 `json:"offset,omitempty"` + // OrderBy: The order in which documents are returned. Documents can be ordered + // by a field in an Document object. Leave it unset if ordered by relevance. + // `order_by` expression is case-sensitive. For more information on ordering + // for retail search, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this field + // is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of Documents to return. The maximum allowed value + // depends on the data type. Values above the maximum value are coerced to the + // maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * + // Websites with advanced indexing: Default `25`, Maximum `50`. * Other: + // Default `50`, Maximum `100`. If this field is negative, an + // `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token received from a previous SearchService.Search call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to SearchService.Search must match the call that + // provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. + PageToken string `json:"pageToken,omitempty"` + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. If set + // to non-empty, results are restricted or boosted based on the location + // provided. For example, `user_country_code: "au" For available codes see + // Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which enables + // image searching. For example, `search_type: 1` + Params googleapi.RawMessage `json:"params,omitempty"` + // Query: Raw search query. + Query string `json:"query,omitempty"` + // QueryExpansionSpec: The query expansion specification that specifies the + // conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. This overrides ServingConfig.ranking_expression. The + // ranking expression is a single function or multiple functions that are + // joined by "+". * ranking_expression = function, { " + ", function }; + // Supported functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RegionCode: 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. + RegionCode string `json:"regionCode,omitempty"` + // SafeSearch: Whether to turn on safe search. This is only supported for + // website search. + SafeSearch bool `json:"safeSearch,omitempty"` + // SearchAsYouTypeSpec: Search as you type configuration. Only supported for + // the IndustryVertical.MEDIA vertical. + SearchAsYouTypeSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec `json:"searchAsYouTypeSpec,omitempty"` + // ServingConfig: Required. The resource name of the Search serving config, + // such as + // `projects/*/locations/global/collections/default_collection/engines/*/serving + // Configs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores/defaul + // t_data_store/servingConfigs/default_serving_config`. This field is used to + // identify the serving configuration name, set of models used to make the + // search. + ServingConfig string `json:"servingConfig,omitempty"` + // Session: The session resource name. Optional. Session allows users to do + // multi-turn /search API calls or coordination between /search API calls and + // /answer API calls. Example #1 (multi-turn /search API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /search API with + // the session ID generated in the first call. Here, the previous search query + // gets considered in query standing. I.e., if the first query is "How did + // Alphabet do in 2022?" and the current query is "How about 2023?", the + // current query will be interpreted as "How did Alphabet do in 2023?". Example + // #2 (coordination between /search API calls and /answer API calls): 1. Call + // /search API with the auto-session mode (see below). 2. Call /answer API with + // the session ID generated in the first call. Here, the answer generation + // happens in the context of the search results from the first search call. + // Auto-session mode: when `projects/.../sessions/-` is used, a new session + // gets automatically created. Otherwise, users can use the create-session API + // to create a session manually. Multi-turn Search feature is currently at + // private GA stage. Please use v1alpha or v1beta version instead before we + // launch this feature to public GA. Or ask for allowlisting through Google + // Support team. + Session string `json:"session,omitempty"` + // SessionSpec: Session specification. Can be used only when `session` is set. + SessionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec `json:"sessionSpec,omitempty"` + // SpellCorrectionSpec: The spell correction specification that specifies the + // mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // UserInfo: Information about the end user. Highly recommended for analytics. + // UserInfo.user_agent is used to deduce `device_type` for analytics. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + // UserPseudoId: A unique identifier for tracking visitors. For example, this + // could be implemented with an HTTP cookie, which should be able to uniquely + // identify a visitor on a single device. This unique identifier should not + // change if the visitor logs in or out of the website. This field should NOT + // have a fixed value such as `unknown_visitor`. This should be the same + // identifier as UserEvent.user_pseudo_id and + // CompleteQueryRequest.user_pseudo_id The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpandedQuery") to include in API + // NullFields is a list of field names (e.g. "BoostSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo +func (s GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult: Represents the -// search results. -type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { - // Chunk: The chunk data in the search response if the - // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. - Chunk *GoogleCloudDiscoveryengineV1betaChunk `json:"chunk,omitempty"` - // Document: The document data snippet in the search response. Only fields that - // are marked as `retrievable` are populated. - Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` - // Id: Document.id of the searched Document. - Id string `json:"id,omitempty"` - // ModelScores: Google provided available scores. - ModelScores map[string]GoogleCloudDiscoveryengineV1betaDoubleList `json:"modelScores,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost specification +// to boost certain documents. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document matches + // multiple conditions in the specifictions, boost scores from these + // specifications are all applied and combined in a non-linear way. Maximum + // number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunk") 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. "ConditionBoostSpecs") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo: Information about -// the session. -type GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo struct { - // Name: Name of the session. If the auto-session mode is used (when - // SearchRequest.session ends with "-"), this field holds the newly generated - // session name. - Name string `json:"name,omitempty"` - // QueryId: Query ID that corresponds to this search API call. One session can - // have multiple turns, each with a unique query ID. By specifying the session - // name and this query ID in the Answer API call, the answer generation happens - // in the context of the search results from this search call. - QueryId string `json:"queryId,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 GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec: +// Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0. Setting to 1.0 gives the document a + // big promotion. However, it does not necessarily mean that the boosted + // document will be the top result at all times, nor that other documents will + // be excluded. Results could still be shown even when none of them matches the + // condition. And results that are significantly more relevant to the search + // query can still trump your heavily favored but irrelevant documents. Setting + // to -1.0 gives the document a big demotion. However, results that are deeply + // relevant might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. Setting to + // 0.0 means no boost applied. The boosting condition is ignored. Only one of + // the (condition, boost) combination or the boost_control_spec below are set. + // If both are set then the global boost is ignored and the more fine-grained + // boost_control_spec is applied. + Boost float64 `json:"boost,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on customer + // defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` + // Condition: An expression which specifies a boost condition. The syntax and + // supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * To boost + // documents with document ID "doc_1" or "doc_2", and color "Red" or "Blue": + // `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the top N -// search results specified by the summary spec. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { - // SafetyAttributes: A collection of Safety Attribute categories and their - // associated confidence scores. - SafetyAttributes *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` - // SummarySkippedReasons: Additional summary-skipped reasons. This provides the - // reason for ignored cases. If nothing is skipped, this field is not set. +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpec: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: 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: - // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary skipped - // reason is not specified. - // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. Only - // populated when SummarySpec.ignore_adversarial_query is set to `true`. - // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only populated when - // SummarySpec.ignore_non_summary_seeking_query is set to `true`. - // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. - // Google skips the summary if there are no high-relevance search results. For - // example, the data store contains facts about company A but the user query is - // asking questions about company B. - // "POTENTIAL_POLICY_VIOLATION" - 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. - // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google skips the - // summary if the LLM addon is not enabled. - SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` - // SummaryText: The summary content. - SummaryText string `json:"summaryText,omitempty"` - // SummaryWithMetadata: Summary with metadata information. - SummaryWithMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // "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]`. For example, `5D`, `3DT12H30M`, `T24H`. + AttributeType string `json:"attributeType,omitempty"` + // ControlPoints: 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 []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + // FieldName: The name of the field whose value will be used to determine the + // boost amount. + FieldName string `json:"fieldName,omitempty"` + // InterpolationType: 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. "SafetyAttributes") to include in + // 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoost +// ControlSpecControlPoint: 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 GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: 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: 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 GoogleCloudDiscoveryengineV1betaSearchResponseSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummary +func (s GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation: Citation info -// for a segment. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { - // EndIndex: End of the attributed segment, exclusive. - EndIndex int64 `json:"endIndex,omitempty,string"` - // Sources: Citation sources for the attributed segment. - Sources []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource `json:"sources,omitempty"` - // StartIndex: Index indicates the start of the segment, measured in - // bytes/unicode. - StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + 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 +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in API + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata: -// Citation metadata. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struct { - // Citations: Citations for segments. - Citations []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation `json:"citations,omitempty"` - // ForceSendFields is a list of field names (e.g. "Citations") to +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Citations") to include in API + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecChunkSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource: -// Citation source. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource struct { - // ReferenceIndex: Document reference index from - // SummaryWithMetadata.references. It is 0-indexed and the value will be zero - // if the reference_index is not set explicitly. - ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveConte +// ntSpec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers returned + // in each search result. An extractive answer is a verbatim answer extracted + // from the original document, which provides a precise and contextually + // relevant answer to the search query. If the number of matching answers is + // less than the `max_extractive_answer_count`, return all of the answers. + // Otherwise, return the `max_extractive_answer_count`. At most five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments returned in + // each search result. Only applied if the DataStore is set to + // DataStore.ContentConfig.CONTENT_REQUIRED or DataStore.solution_types is + // SOLUTION_TYPE_CHAT. An extractive segment is a text segment extracted from + // the original document that is relevant to the search query, and, in general, + // more verbose than an extractive answer. The segment could then be used as + // input for LLMs to generate summaries and answers. If the number of matching + // segments is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent from + // each selected segments. Return at most `num_previous_segments` segments + // before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control snippet + // return, use `return_snippet` field. For backwards compatibility, we will + // return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no affect + // on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be + // returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReferenceIndex") to include in + // NullFields is a list of field names (e.g. "MaxSnippetCount") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference: Document -// reference. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference struct { - // ChunkContents: List of cited chunk contents derived from document content. - ChunkContents []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` - // Document: Required. Document.name of the document. Full resource name of the - // referenced document, in the format - // `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. - Document string `json:"document,omitempty"` - // Title: Title of the document. - Title string `json:"title,omitempty"` - // Uri: Cloud Storage or HTTP uri for the document. - Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkContents") to +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial queries. + // The default value is `false`. Google employs search-query classification to + // detect adversarial queries. No summary is returned if the search query is + // classified as an adversarial query. For example, a user might ask a question + // regarding negative comments about the company or submit a query designed to + // generate unsafe, policy-violating output. If this field is set to `true`, we + // skip generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries that + // are not summary-seeking. The default value is `false`. Google employs + // search-query classification to detect summary-seeking queries. No summary is + // returned if the search query is classified as a non-summary seeking query. + // For example, `why is the sky blue` and `Who is the best soccer player in the + // world?` are summary-seeking queries, but `SFO airport` and `world cup 2026` + // are not. They are most likely navigational queries. If this field is set to + // `true`, we skip generating summaries for non-summary seeking queries and + // return fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` + // IncludeCitations: Specifies whether to include citations in the summary. The + // default value is `false`. When this field is set to `true`, summaries + // include in-line citation numbers. Example summary including citations: + // BigQuery is Google Cloud's fully managed and completely serverless + // enterprise data warehouse [1]. BigQuery supports all data types, works + // across clouds, and has built-in machine learning and business intelligence, + // all within a unified platform [2, 3]. The citation numbers refer to the + // returned search results and are 1-indexed. For example, [1] means that the + // sentence is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by BCP47 + // (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an + // experimental feature. + LanguageCode string `json:"languageCode,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // SummaryResultCount: The number of top results to generate the summary from. + // If the number of results returned is less than `summaryResultCount`, the + // summary is generated from all of the results. At most 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "IgnoreAdversarialQuery") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkContents") 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. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent: -// Chunk content. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent struct { - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,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 +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lPromptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Preamble") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes: -// Safety Attribute categories and their associated confidence scores. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struct { - // Categories: The display names of Safety Attribute categories associated with - // the generated content. Order matches the Scores. - Categories []string `json:"categories,omitempty"` - // Scores: The confidence scores of the each category, higher value means - // higher confidence. Order matches the Categories. - Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "Categories") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMode +// lSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Categories") to include in API + // NullFields is a list of field names (e.g. "Version") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes +func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes - var s1 struct { - Scores []gensupport.JSONFloat64 `json:"scores"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Scores = make([]float64, len(s1.Scores)) - for i := range s1.Scores { - s.Scores[i] = float64(s1.Scores[i]) - } - return nil -} - -// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata: -// Summary with metadata information. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata struct { - // CitationMetadata: Citation metadata for given summary. - CitationMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` - // References: Document References. - References []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference `json:"references,omitempty"` - // Summary: Summary text with no citation information. - Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to +// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct to +// define data stores to filter on in a search call and configurations for +// those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. +type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaServingConfig: Configures metadata that is -// used to generate serving time results (e.g. search results or recommendation -// predictions). The ServingConfig is passed in the search and predict request -// and generates results. -type GoogleCloudDiscoveryengineV1betaServingConfig struct { - // BoostControlIds: Boost controls to use in serving path. All triggered boost - // controls will be applied. Boost controls must be in the same data store as - // the serving config. Maximum of 20 boost controls. - BoostControlIds []string `json:"boostControlIds,omitempty"` - // CreateTime: Output only. ServingConfig created timestamp. - CreateTime string `json:"createTime,omitempty"` - // DisplayName: Required. The human readable serving config display name. Used - // in Discovery UI. This field must be a UTF-8 encoded string with a length - // limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` - // DissociateControlIds: Condition do not associate specifications. If multiple - // do not associate conditions match, all matching do not associate controls in - // the list will execute. Order does not matter. Maximum number of - // specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - DissociateControlIds []string `json:"dissociateControlIds,omitempty"` - // DiversityLevel: How much diversity to use in recommendation model results - // e.g. `medium-diversity` or `high-diversity`. Currently supported values: * - // `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * - // `auto-diversity` If not specified, we choose default based on recommendation - // model type. Default value: `no-diversity`. Can only be set if SolutionType - // is SOLUTION_TYPE_RECOMMENDATION. - DiversityLevel string `json:"diversityLevel,omitempty"` - // EmbeddingConfig: Bring your own embedding config. The config is used for - // search semantic retrieval. The retrieval is based on the dot product of - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document - // embeddings that are provided by this EmbeddingConfig. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides - // this ServingConfig.embedding_config. - EmbeddingConfig *GoogleCloudDiscoveryengineV1betaEmbeddingConfig `json:"embeddingConfig,omitempty"` - // FilterControlIds: Filter controls to use in serving path. All triggered - // filter controls will be applied. Filter controls must be in the same data - // store as the serving config. Maximum of 20 filter controls. - FilterControlIds []string `json:"filterControlIds,omitempty"` - // GenericConfig: The GenericConfig of the serving configuration. - GenericConfig *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig `json:"genericConfig,omitempty"` - // IgnoreControlIds: Condition ignore specifications. If multiple ignore - // conditions match, all matching ignore controls in the list will execute. - // Order does not matter. Maximum number of specifications is 100. - IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` - // MediaConfig: The MediaConfig of the serving configuration. - MediaConfig *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig `json:"mediaConfig,omitempty"` - // ModelId: The id of the model to use at serving time. Currently only - // RecommendationModels are supported. Can be changed but only to a compatible - // model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required - // when SolutionType is SOLUTION_TYPE_RECOMMENDATION. - ModelId string `json:"modelId,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ - // {engine_id}/servingConfigs/{serving_config_id}` - Name string `json:"name,omitempty"` - // OnewaySynonymsControlIds: Condition oneway synonyms specifications. If - // multiple oneway synonyms conditions match, all matching oneway synonyms - // controls in the list will execute. Maximum number of specifications is 100. - // Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. - OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` - // RankingExpression: The ranking expression controls the customized ranking on - // retrieval documents. To leverage this, document embedding is required. The - // ranking expression setting in ServingConfig applies to all search requests - // served by the serving config. However, if SearchRequest.ranking_expression - // is specified, it overrides the ServingConfig ranking expression. The ranking - // expression is a single function or multiple functions that are joined by - // "+". * ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: * `relevance_score`: - // pre-defined keywords, used for measure relevance between query and document. - // * `embedding_field_path`: the document embedding field used with query - // embedding vector. * `dotProduct`: embedding function between - // embedding_field_path and query embedding vector. Example ranking expression: - // If document has an embedding field doc_embedding, the ranking expression - // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. - RankingExpression string `json:"rankingExpression,omitempty"` - // RedirectControlIds: IDs of the redirect controls. Only the first triggered - // redirect action is applied, even if multiple apply. Maximum number of - // specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - RedirectControlIds []string `json:"redirectControlIds,omitempty"` - // ReplacementControlIds: Condition replacement specifications. Applied - // according to the order in the list. A previously replaced term can not be - // re-replaced. Maximum number of specifications is 100. Can only be set if - // SolutionType is SOLUTION_TYPE_SEARCH. - ReplacementControlIds []string `json:"replacementControlIds,omitempty"` - // SolutionType: Required. Immutable. Specifies the solution type that a - // serving config can be associated with. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI - // agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. - SolutionType string `json:"solutionType,omitempty"` - // SynonymsControlIds: Condition synonyms specifications. If multiple synonyms - // conditions match, all matching synonyms controls in the list will execute. - // Maximum number of specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` - // UpdateTime: Output only. ServingConfig updated timestamp. - 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. "BoostControlIds") to +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do semantic +// document retrieval. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostControlIds") to include in + // NullFields is a list of field names (e.g. "EmbeddingVectors") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfig +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies the -// configurations needed for Generic Discovery.Currently we support: * -// `content_search_spec`: configuration for generic content search. -type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { - // ContentSearchSpec: Specifies the expected behavior of content search. Only - // valid for content-search enabled data store. - ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") to +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector: +// Embedding vector. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentSearchSpec") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig: Specifies the -// configurations needed for Media Discovery. Currently we support: * -// `demote_content_watched`: Threshold for watched content demotion. Customers -// can specify if using watched content demotion or use viewed detail page. -// Using the content watched demotion, customers need to specify the watched -// minutes or percentage exceeds the threshold, the content will be demoted in -// the recommendation result. * `promote_fresh_content`: cutoff days for fresh -// content promotion. Customers can specify if using content freshness -// promotion. If the content was published within the cutoff days, the content -// will be promoted in the recommendation result. Can only be set if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -type GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig struct { - // ContentFreshnessCutoffDays: Specifies the content freshness used for - // recommendation result. Contents will be demoted if contents were published - // for more than content freshness cutoff days. - ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` - // ContentWatchedPercentageThreshold: Specifies the content watched percentage - // threshold for demotion. Threshold value must be between [0, 1.0] inclusive. - ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` - // ContentWatchedSecondsThreshold: Specifies the content watched minutes - // threshold for demotion. - ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` - // DemotionEventType: Specifies the event type used for demoting recommendation - // result. Currently supported values: * `view-item`: Item viewed. * - // `media-play`: Start/resume watching a video, playing a song, etc. * - // `media-complete`: Finished or stopped midway through a video, song, etc. If - // unset, watch history demotion will not be applied. Content freshness - // demotion will still be applied. - DemotionEventType string `json:"demotionEventType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentFreshnessCutoffDays") - // to unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentFreshnessCutoffDays") 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. "FieldPath") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig +func (s GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector var s1 struct { - ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` - ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + Vector []gensupport.JSONFloat64 `json:"vector"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) - s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } return nil } -// GoogleCloudDiscoveryengineV1betaSession: External session proto definition. -type GoogleCloudDiscoveryengineV1betaSession struct { - // EndTime: Output only. The time the session finished. - EndTime string `json:"endTime,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/engines/{engine - // }/sessions/*` - Name string `json:"name,omitempty"` - // StartTime: Output only. The time the session started. - StartTime string `json:"startTime,omitempty"` - // State: The state of the session. - // - // Possible values: - // "STATE_UNSPECIFIED" - State is unspecified. - // "IN_PROGRESS" - The session is currently open. - State string `json:"state,omitempty"` - // Turns: Turns. - Turns []*GoogleCloudDiscoveryengineV1betaSessionTurn `json:"turns,omitempty"` - // UserPseudoId: A unique identifier for tracking users. - UserPseudoId string `json:"userPseudoId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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 +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If set to + // true, the position of this facet among all facets in the response is + // determined automatically. If dynamic facets are enabled, it is ordered + // together. If set to false, the position of this facet in the response is the + // same as in the request, and it is ranked before the facets with dynamic + // position enable and all dynamic facets. For example, you may always want to + // have rating facet returned in the response, but it's not necessarily to + // always display the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet in + // response is determined automatically. Another example, assuming you have the + // following facets in the request: * "rating", enable_dynamic_position = true + // * "price", enable_dynamic_position = false * "brands", + // enable_dynamic_position = false And also you have a dynamic facets enabled, + // which generates a facet `gender`. Then the final order of the facets in the + // response can be ("price", "brands", "rating", "gender") or ("price", + // "brands", "gender", "rating") depends on how API orders "gender" and + // "rating" facets. However, notice that "price" and "brands" are always ranked + // at first and second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By default, + // FacetKey.key is not excluded from the filter unless it is listed in this + // field. Listing a facet key in this field allows its values to appear as + // facet results, even when they are filtered out of search results. Using this + // field does not affect what search results are returned. For example, suppose + // there are 100 documents with the color facet "Red" and 200 documents with + // the color facet "Blue". A query containing the filter "color:ANY("Red")" and + // having "color" as FacetKey.key would by default return only "Red" documents + // in the search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" would + // not be shown as an available facet value. If "color" is listed in + // "excludedFilterKeys", then the query returns the facet values "Red" with + // count 100 and "Blue" with count 200, because the "color" key is now excluded + // from the filter. Because this field doesn't affect search results, the + // search results are still correctly filtered to return only "Red" documents. + // A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT` error + // is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // Limit: Maximum facet values that are returned for this facet. If + // unspecified, defaults to 20. The maximum allowed value is 300. Values above + // 300 are coerced to 300. For aggregation in healthcare search, when the + // [FacetKey.key] is "healthcare_aggregation_key", the limit will be overridden + // to 10,000 internally, regardless of the value set here. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableDynamicPosition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "EnableDynamicPosition") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSession) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSession +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSessionTurn: Represents a turn, including a -// query from the user and a answer from service. -type GoogleCloudDiscoveryengineV1betaSessionTurn struct { - // Answer: The resource name of the answer to the user query. Only set if the - // answer generation (/answer API call) happened in this turn. - Answer string `json:"answer,omitempty"` - // Query: The user query. - Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: Specifies +// how a facet is computed. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when getting + // faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` + // Contains: Only get facet values that contain the given strings. For example, + // suppose "category" has three values "Action > 2022", "Action > 2021" and + // "Sci-Fi > 2022". If set "contains" to "2022", the "category" facet only + // contains "Action > 2022" and "Sci-Fi > 2022". Only supported on textual + // fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must be set + // for facets with numerical values. Must not be set for facet with text + // values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values are: * + // "count desc", which means order by SearchResponse.Facet.values.count + // descending. * "value desc", which means order by + // SearchResponse.Facet.values.value descending. Only applies to textual + // facets. If not set, textual values are sorted in natural order + // (https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are + // sorted in the order given by FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + // Prefixes: Only get facet values that start with the given string prefix. For + // example, suppose "category" has three values "Action > 2022", "Action > + // 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the "category" + // facet only contains "Action > 2022" and "Action > 2021". Only supported on + // textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + // RestrictedValues: Only get facet for the given restricted values. Only + // supported on textual fields. For example, suppose "category" has three + // values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set + // "restricted_values" to "Action > 2022", the "category" facet only contains + // "Action > 2022". Only supported on textual fields. Maximum is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Answer") 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. "CaseInsensitive") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSessionTurn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSessionTurn +func (s GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSiteSearchEngine: SiteSearchEngine captures -// DataStore level site search persisting configurations. It is a singleton -// value per data store. -type GoogleCloudDiscoveryengineV1betaSiteSearchEngine struct { - // Name: The fully qualified resource name of the site search engine. Format: - // `projects/*/locations/*/dataStores/*/siteSearchEngine` - 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. "Name") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies the image +// query input. +type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: JPEG, PNG, + // and BMP. + ImageBytes string `json:"imageBytes,omitempty"` + // ForceSendFields is a list of field names (e.g. "ImageBytes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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. "ImageBytes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSiteSearchEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteSearchEngine +func (s GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the ownership and - // validity. +// GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandin +// gSpec: Specification to enable natural language understanding capabilities +// for search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec struct { + // FilterExtractionCondition: The condition under which filter extraction + // should occur. Default to Condition.DISABLED. // // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website that - // opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to - // unconditionally include in API requests. By default, fields with empty or + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables NL filter extraction. + // "ENABLED" - Enables NL filter extraction. + FilterExtractionCondition string `json:"filterExtractionCondition,omitempty"` + // GeoSearchQueryDetectionFieldNames: Field names used for location-based + // filtering, where geolocation filters are detected in natural language search + // queries. Only valid when the FilterExtractionCondition is set to `ENABLED`. + // If this field is set, it overrides the field names set in + // ServingConfig.geo_search_query_detection_field_names. + GeoSearchQueryDetectionFieldNames []string `json:"geoSearchQueryDetectionFieldNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "FilterExtractionCondition") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") to + // NullFields is a list of field names (e.g. "FilterExtractionCondition") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo +func (s GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestNaturalLanguageQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSpannerSource: The Spanner source for -// importing data -type GoogleCloudDiscoveryengineV1betaSpannerSource struct { - // DatabaseId: Required. The database ID of the source Spanner table. - DatabaseId string `json:"databaseId,omitempty"` - // EnableDataBoost: Whether to apply data boost on Spanner export. Enabling - // this option will incur additional cost. More info can be found here - // (https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). - 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 string `json:"projectId,omitempty"` - // TableId: Required. The table name of the Spanner database that needs to be - // imported. - TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseId") to +// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion should +// occur. +type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. Default + // to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In this + // case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query is + // used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this field is + // set to true, unexpanded products are always at the top of the search + // results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in API + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSpannerSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSpannerSource +func (s GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry: Suggestion deny -// list entry identifying the phrase to block from suggestions and the applied -// operation for the phrase. -type GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry struct { - // BlockPhrase: Required. Phrase to block from suggestions served. Can be - // maximum 125 characters. - BlockPhrase string `json:"blockPhrase,omitempty"` - // MatchOperator: Required. The match operator to apply for this phrase. - // Whether to block the exact phrase, or block any suggestions containing this - // phrase. +// GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec: +// Specification for search as you type in search requests. +type GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec struct { + // Condition: The condition under which search as you type should occur. + // Default to Condition.DISABLED. // // Possible values: - // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used - // "EXACT_MATCH" - If the suggestion is an exact match to the block_phrase, - // then block it. - // "CONTAINS" - If the suggestion contains the block_phrase, then block it. - MatchOperator string `json:"matchOperator,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockPhrase") to + // "CONDITION_UNSPECIFIED" - Server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disables Search As You Type. + // "ENABLED" - Enables Search As You Type. + Condition string `json:"condition,omitempty"` + // ForceSendFields is a list of field names (e.g. "Condition") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockPhrase") to include in API + // NullFields is a list of field names (e.g. "Condition") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSearchAsYouTypeSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1betaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated to - // include all pages whose address contains the provided_uri_pattern. If set to - // true, an uri_pattern is generated to try to be an exact match of the - // provided_uri_pattern or just the specific page if the provided_uri_pattern - // is a specific one. provided_uri_pattern is always normalized to generate the - // URI pattern to be used by the search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` - // GeneratedUriPattern: Output only. This is system-generated based on the - // provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be picked up - // by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to be - // deleted. This is a transitioning state which will resulted in either: 1. - // target site deleted if unindexing is successful; 2. state reverts to - // SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - // Name: Output only. The fully qualified resource name of the target site. - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` - // ProvidedUriPattern: Required. Input only. The user provided URI pattern from - // which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - // RootDomainUri: Output only. Root domain of the provided_uri_pattern. - RootDomainUri string `json:"rootDomainUri,omitempty"` - // SiteVerificationInfo: Output only. Site ownership and validity verification - // status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be included - // or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior - // defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - // UpdateTime: Output only. The target site's last updated time. - 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. "ExactMatch") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec: Session +// specification. Multi-turn Search feature is currently at private GA stage. +// Please use v1alpha or v1beta version instead before we launch this feature +// to public GA. Or ask for allowlisting through Google Support team. +type GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec struct { + // QueryId: If set, the search result gets stored to the "turn" specified by + // this query ID. Example: Let's say the session looks like this: session { + // name: ".../sessions/xxx" turns { query { text: "What is foo?" query_id: + // ".../questions/yyy" } answer: "Foo is ..." } turns { query { text: "How + // about bar then?" query_id: ".../questions/zzz" } } } The user can call + // /search API with a request like this: session: ".../sessions/xxx" + // session_spec { query_id: ".../questions/zzz" } Then, the API stores the + // search result, associated with the last turn. The stored search result can + // be used by a subsequent /answer API call (with the session ID and the query + // ID specified). Also, it is possible to call /search and /answer in parallel + // with the same session ID & query ID. + QueryId string `json:"queryId,omitempty"` + // SearchResultPersistenceCount: The number of top search results to persist. + // The persisted search results can be used for the subsequent /answer api + // call. This field is simliar to the `summary_result_count` field in + // SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count. At most 10 + // results for documents mode, or 50 for chunks mode. + SearchResultPersistenceCount int64 `json:"searchResultPersistenceCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "QueryId") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in API + // NullFields is a list of field names (e.g. "QueryId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSessionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction replaces the original search + // query. Defaults to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this case, + // server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API tries to find a spelling suggestion. If a + // suggestion is found, it is put in the SearchResponse.corrected_query. The + // spelling suggestion won't be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search will + // be based on the corrected query if found. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "Mode") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") 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. "Mode") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason +func (s GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: Failed -// due to insufficient quota. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total quota - // this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to +// GoogleCloudDiscoveryengineV1betaSearchResponse: Response message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchResponse struct { + // AppliedControls: Controls applied as part of the Control service. + 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. + 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 + // corrected_query. Otherwise the original query is used for search. + CorrectedQuery string `json:"correctedQuery,omitempty"` + // Facets: Results of facets requested by user. + Facets []*GoogleCloudDiscoveryengineV1betaSearchResponseFacet `json:"facets,omitempty"` + GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` + // GuidedSearchResult: Guided search result. + GuidedSearchResult *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` + // NaturalLanguageQueryUnderstandingInfo: Natural language query understanding + // information for the returned results. + NaturalLanguageQueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo `json:"naturalLanguageQueryUnderstandingInfo,omitempty"` + // NextPageToken: A token that can be sent as SearchRequest.page_token to + // retrieve the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` + // QueryExpansionInfo: Query expansion information for the returned results. + QueryExpansionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` + // RedirectUri: The URI of a customer-defined redirect page. If redirect action + // is triggered, no search is performed, and only redirect_uri and + // attribution_token are set in the response. + RedirectUri string `json:"redirectUri,omitempty"` + // Results: A list of matched documents. The order represents the ranking. + Results []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"results,omitempty"` + // SessionInfo: Session information. Only set if SearchRequest.session is + // provided. See its description for more details. + SessionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo `json:"sessionInfo,omitempty"` + // Summary: A summary as part of the search results. This field is only + // returned if SearchRequest.ContentSearchSpec.summary_spec is set. + Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` + // TotalSize: The estimated total count of matched items irrespective of + // pagination. The count of results returned by pagination may be less than the + // total_size that matches. + 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. "AppliedControls") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") 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. "AppliedControls") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure +func (s GoogleCloudDiscoveryengineV1betaSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTextInput: Defines text input. -type GoogleCloudDiscoveryengineV1betaTextInput struct { - // Context: Conversation context of the input. - Context *GoogleCloudDiscoveryengineV1betaConversationContext `json:"context,omitempty"` - // Input: Text input. - Input string `json:"input,omitempty"` - // ForceSendFields is a list of field names (e.g. "Context") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchResponseFacet: A facet result. +type GoogleCloudDiscoveryengineV1betaSearchResponseFacet struct { + // DynamicFacet: Whether the facet is dynamically generated. + DynamicFacet bool `json:"dynamicFacet,omitempty"` + // Key: The key for this facet. For example, "colors" or "price". It + // matches SearchRequest.FacetSpec.FacetKey.key. + Key string `json:"key,omitempty"` + // Values: The facet values for this field. + Values []*GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "DynamicFacet") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Context") to include in API + // NullFields is a list of field names (e.g. "DynamicFacet") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTextInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTextInput +func (s GoogleCloudDiscoveryengineV1betaSearchResponseFacet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacet return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata related -// to the progress of the TrainCustomModel operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue: A facet value +// which contains value names and their count. +type GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue struct { + // Count: Number of items that have this facet value. + Count int64 `json:"count,omitempty,string"` + // Interval: Interval value for a facet, such as 10, 20) for facet "price". It + // matches [SearchRequest.FacetSpec.FacetKey.intervals. + Interval *GoogleCloudDiscoveryengineV1betaInterval `json:"interval,omitempty"` + // Value: Text value of a facet, such as "Black" for facet "colors". + Value string `json:"value,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. "CreateTime") to include in API + // 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 GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest: Request message for -// SearchTuningService.TrainCustomModel method. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest struct { - // ErrorConfig: The desired location of errors incurred during the data - // ingestion and training. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // GcsTrainingInput: Cloud Storage training input. - GcsTrainingInput *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput `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 +// GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo: Debug +// information specifically related to forward geocoding issues arising from +// Geolocation Search. +type GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo struct { + // ErrorMessage: The error produced. + ErrorMessage string `json:"errorMessage,omitempty"` + // OriginalAddressQuery: The address from which forward geocoding ingestion + // produced issues. + OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ErrorMessage") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest +func (s GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput: -// Cloud Storage training data input. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult: Guided +// search result. The guided search helps user to refine the search results and +// narrow down to the real needs from a broaded search results. +type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult struct { + // FollowUpQuestions: Suggested follow-up questions. + FollowUpQuestions []string `json:"followUpQuestions,omitempty"` + // RefinementAttributes: A list of ranked refinement attributes. + RefinementAttributes []*GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` + // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "FollowUpQuestions") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput +func (s GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of the -// TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the request - // if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `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 +// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAtt +// ribute: Useful attribute for search result refinements. +type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute struct { + // AttributeKey: Attribute key used to refine the results. For example, + // "movie_type". + AttributeKey string `json:"attributeKey,omitempty"` + // AttributeValue: Attribute value used to refine the results. For example, + // "drama". + AttributeValue string `json:"attributeValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeKey") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "AttributeKey") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaTransactionInfo: A transaction represents -// the entire purchase transaction. -type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { - // Cost: All the costs associated with the products. These can be manufacturing - // costs, shipping expenses not borne by the end user, or any other costs, such - // that: * Profit = value - tax - cost - Cost float64 `json:"cost,omitempty"` - // Currency: Required. Currency code. Use three-character ISO-4217 code. - Currency string `json:"currency,omitempty"` - // DiscountValue: The total discount(s) value applied to this transaction. This - // figure should be excluded from TransactionInfo.value For example, if a user - // paid TransactionInfo.value amount, then nominal (pre-discount) value of the - // transaction is the sum of TransactionInfo.value and - // TransactionInfo.discount_value This means that profit is calculated the same - // way, regardless of the discount value, and that - // TransactionInfo.discount_value can be larger than TransactionInfo.value: * - // Profit = value - tax - cost - DiscountValue float64 `json:"discountValue,omitempty"` - // Tax: All the taxes associated with the transaction. - Tax float64 `json:"tax,omitempty"` - // TransactionId: The transaction ID with a length limit of 128 characters. - TransactionId string `json:"transactionId,omitempty"` - // Value: Required. Total non-zero value associated with the transaction. This - // value may include shipping, tax, or other adjustments to the total value - // that you want to include. - Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cost") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cost") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleCloudDiscoveryengineV1betaTransactionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo +func (s GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo - var s1 struct { - Cost gensupport.JSONFloat64 `json:"cost"` - DiscountValue gensupport.JSONFloat64 `json:"discountValue"` - Tax gensupport.JSONFloat64 `json:"tax"` - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Cost = float64(s1.Cost) - s.DiscountValue = float64(s1.DiscountValue) - s.Tax = float64(s1.Tax) - s.Value = float64(s1.Value) - return nil -} - -// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata associated with -// a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune applies to. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collection_id - // }/engines/{engine_id}` - Engine string `json:"engine,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfo: Information describing what natural language understanding was done +// on the input query. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo struct { + // ExtractedFilters: The filters that were extracted from the input query. + ExtractedFilters string `json:"extractedFilters,omitempty"` + // RewrittenQuery: Rewritten input query minus the extracted filters. + RewrittenQuery string `json:"rewrittenQuery,omitempty"` + // StructuredExtractedFilter: The filters that were extracted from the input + // query represented in a structured form. + StructuredExtractedFilter *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter `json:"structuredExtractedFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "ExtractedFilters") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engine") 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. "ExtractedFilters") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTuneEngineRequest: Request to manually start -// a tuning process now (instead of waiting for the periodically scheduled -// tuning to happen). -type GoogleCloudDiscoveryengineV1betaTuneEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaTuneEngineResponse: Response associated with -// a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilter: The filters that were extracted from the +// input query represented in a structured form. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter struct { + // Expression: The expression denoting the filter that was extracted from the + // input query in a structured form. It can be a simple expression denoting a + // single string, numerical or geolocation constraint or a compound expression + // which is a combination of multiple expressions connected using logical (OR + // and AND) operators. + Expression *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expression,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expression") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Expression") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilter return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterAndExpression: Logical `And` operator. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression struct { + // Expressions: The expressions that were ANDed together. + Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Expressions") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUserEvent: UserEvent captures all metadata -// information Discovery Engine API needs to know about how end users interact -// with your website. -type GoogleCloudDiscoveryengineV1betaUserEvent struct { - // Attributes: Extra user event features to include in the recommendation - // model. These attributes must NOT contain data that needs to be parsed or - // processed further, e.g. JSON or other encodings. If you provide custom - // attributes for ingested user events, also include them in the user events - // that you associate with prediction requests. Custom attribute formatting - // must be consistent between imported events and events provided with - // prediction requests. This lets the Discovery Engine API use those custom - // attributes when training models and serving predictions, which helps improve - // recommendation quality. This field needs to pass all below criteria, - // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a UTF-8 - // encoded string with a length limit of 5,000 characters. * For text - // attributes, at most 400 values are allowed. Empty values are not allowed. - // Each value must be a UTF-8 encoded string with a length limit of 256 - // characters. * For number attributes, at most 400 values are allowed. For - // product recommendations, an example of extra user information is - // `traffic_channel`, which is how a user arrives at the site. Users can arrive - // at the site by coming to the site directly, coming through Google search, or - // in other ways. - Attributes map[string]GoogleCloudDiscoveryengineV1betaCustomAttribute `json:"attributes,omitempty"` - // AttributionToken: Token to attribute an API response to user action(s) to - // trigger the event. Highly recommended for user events that are the result of - // RecommendationService.Recommend. This field enables accurate attribution of - // recommendation model performance. The value must be one of: * - // RecommendResponse.attribution_token for events that are the result of - // RecommendationService.Recommend. * SearchResponse.attribution_token for - // events that are the result of SearchService.Search. This token enables us to - // accurately attribute page view or conversion completion back to the event - // and the particular predict response containing this clicked/purchased - // product. If user clicks on product K in the recommendation results, pass - // RecommendResponse.attribution_token as a URL parameter to product K's page. - // When recording events on product K's page, log the - // RecommendResponse.attribution_token to this field. - AttributionToken string `json:"attributionToken,omitempty"` - // CompletionInfo: CompletionService.CompleteQuery details related to the - // event. This field should be set for `search` event when autocomplete - // function is enabled and the user clicks a suggestion for search. - CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` - // DataStore: The DataStore resource full name, of the form - // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor - // es/{data_store_id}`. Optional. Only required for user events whose data - // store can't by determined by UserEvent.engine or UserEvent.documents. If - // data store is set in the parent of write/import/collect user event requests, - // this field can be omitted. - DataStore string `json:"dataStore,omitempty"` - // DirectUserRequest: Should set to true if the request is made directly from - // the end user, in which case the UserEvent.user_info.user_agent can be - // populated from the HTTP request. This flag should be set only if the API - // request is made directly from the end user such as a mobile app (and not if - // a gateway or a server is processing and pushing the user events). This - // should not be set when using the JavaScript tag in - // UserEventService.CollectUserEvent. - DirectUserRequest bool `json:"directUserRequest,omitempty"` - // Documents: List of Documents associated with this user event. This field is - // optional except for the following event types: * `view-item` * `add-to-cart` - // * `purchase` * `media-play` * `media-complete` In a `search` event, this - // field represents the documents returned to the end user on the current page - // (the end user may have not finished browsing the whole page yet). When a new - // page is returned to the end user, after pagination/filtering/ordering even - // for the same query, a new `search` event with different UserEvent.documents - // is desired. - Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` - // Engine: The Engine resource name, in the form of - // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ - // {engine_id}`. Optional. Only required for Engine produced user events. For - // example, user events from blended search. - Engine string `json:"engine,omitempty"` - // EventTime: Only required for UserEventService.ImportUserEvents method. - // Timestamp of when the user event happened. - EventTime string `json:"eventTime,omitempty"` - // EventType: Required. User event type. Allowed values are: Generic values: * - // `search`: Search for Documents. * `view-item`: Detailed page view of a - // Document. * `view-item-list`: View of a panel or ordered list of Documents. - // * `view-home-page`: View of the home page. * `view-category-page`: View of a - // category page, e.g. Home > Men > Jeans Retail-related values: * - // `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * - // `purchase`: Purchase an item(s) Media-related values: * `media-play`: - // Start/resume watching a video, playing a song, etc. * `media-complete`: - // Finished or stopped midway through a video, song, etc. - EventType string `json:"eventType,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents being - // filtered. One example is for `search` events, the associated SearchRequest - // may contain a filter expression in SearchRequest.filter conforming to - // https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events - // that are generated from a RecommendRequest, this field may be populated - // directly from RecommendRequest.filter conforming to - // https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded - // string with a length limit of 1,000 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - Filter string `json:"filter,omitempty"` - // MediaInfo: Media-specific info. - MediaInfo *GoogleCloudDiscoveryengineV1betaMediaInfo `json:"mediaInfo,omitempty"` - // PageInfo: Page metadata such as categories and other critical information - // for certain event types such as `view-category-page`. - PageInfo *GoogleCloudDiscoveryengineV1betaPageInfo `json:"pageInfo,omitempty"` - // Panel: Panel metadata associated with this user event. - Panel *GoogleCloudDiscoveryengineV1betaPanelInfo `json:"panel,omitempty"` - // PromotionIds: The promotion IDs if this is an event associated with - // promotions. Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` - // SearchInfo: SearchService.Search details related to the event. This field - // should be set for `search` event. - SearchInfo *GoogleCloudDiscoveryengineV1betaSearchInfo `json:"searchInfo,omitempty"` - // SessionId: A unique identifier for tracking a visitor session with a length - // limit of 128 bytes. A session is an aggregation of an end user behavior in a - // time span. A general guideline to populate the session_id: 1. If user has no - // activity for 30 min, a new session_id should be assigned. 2. The session_id - // should be unique across users, suggest use uuid or add - // UserEvent.user_pseudo_id as prefix. - SessionId string `json:"sessionId,omitempty"` - // TagIds: A list of identifiers for the independent experiment groups this - // user event belongs to. This is used to distinguish between user events - // associated with different experiment setups. - TagIds []string `json:"tagIds,omitempty"` - // TransactionInfo: The transaction metadata (if any) associated with this user - // event. - TransactionInfo *GoogleCloudDiscoveryengineV1betaTransactionInfo `json:"transactionInfo,omitempty"` - // UserInfo: Information about the end user. - UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` - // UserPseudoId: Required. A unique identifier for tracking visitors. For - // example, this could be implemented with an HTTP cookie, which should be able - // to uniquely identify a visitor on a single device. This unique identifier - // should not change if the visitor log in/out of the website. Do not set the - // field to the same fixed ID for different users. This mixes the event history - // of those users together, which results in degraded model quality. The field - // must be a UTF-8 encoded string with a length limit of 128 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not - // contain PII or user-data. We recommend to use Google Analytics Client ID - // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - // for this field. - UserPseudoId string `json:"userPseudoId,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterExpression: The expression denoting the +// filter that was extracted from the input query. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression struct { + // AndExpr: Logical "And" compound operator connecting multiple expressions. + AndExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterAndExpression `json:"andExpr,omitempty"` + // GeolocationConstraint: Geolocation constraint expression. + GeolocationConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint `json:"geolocationConstraint,omitempty"` + // NumberConstraint: Numerical constraint expression. + NumberConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint `json:"numberConstraint,omitempty"` + // OrExpr: Logical "Or" compound operator connecting multiple expressions. + OrExpr *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression `json:"orExpr,omitempty"` + // StringConstraint: String constraint expression. + StringConstraint *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint `json:"stringConstraint,omitempty"` + // ForceSendFields is a list of field names (e.g. "AndExpr") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AndExpr") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Attributes") to +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterGeolocationConstraint: Constraint of a +// geolocation field. Name of the geolocation field as defined in the schema. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint struct { + // Address: The reference address that was inferred from the input query. The + // proximity of the reference address to the geolocation field will be used to + // filter the results. + Address string `json:"address,omitempty"` + // FieldName: The name of the geolocation field as defined in the schema. + FieldName string `json:"fieldName,omitempty"` + // RadiusInMeters: The radius in meters around the address. The record is + // returned if the location of the geolocation field is within the radius. + RadiusInMeters float64 `json:"radiusInMeters,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 GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterGeolocationConstraint + var s1 struct { + RadiusInMeters gensupport.JSONFloat64 `json:"radiusInMeters"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RadiusInMeters = float64(s1.RadiusInMeters) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterNumberConstraint: Constraint expression of a +// number field. Example: price < 100. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint struct { + // Comparison: The comparison operation performed between the field value and + // the value specified in the constraint. + // + // Possible values: + // "COMPARISON_UNSPECIFIED" - Undefined comparison operator. + // "EQUALS" - Denotes equality `=` operator. + // "LESS_THAN_EQUALS" - Denotes less than or equal to `<=` operator. + // "LESS_THAN" - Denotes less than `<` operator. + // "GREATER_THAN_EQUALS" - Denotes greater than or equal to `>=` operator. + // "GREATER_THAN" - Denotes greater than `>` operator. + Comparison string `json:"comparison,omitempty"` + // FieldName: Name of the numerical field as defined in the schema. + FieldName string `json:"fieldName,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 // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attributes") to include in API + // NullFields is a list of field names (e.g. "Comparison") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUserEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUserEvent +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. -type GoogleCloudDiscoveryengineV1betaUserInfo struct { - // UserAgent: User agent as included in the HTTP header. The field must be a - // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. This should not be set when using the - // client side event reporting with GTM or JavaScript tag in - // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is - // set. - UserAgent string `json:"userAgent,omitempty"` - // UserId: Highly recommended for logged-in users. Unique identifier for - // logged-in user, such as a user name. Don't set for anonymous users. Always - // use a hashed value for this ID. Don't set the field to the same fixed ID for - // different users. This mixes the event history of those users together, which - // results in degraded model quality. The field must be a UTF-8 encoded string - // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - UserId string `json:"userId,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserAgent") to +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterNumberConstraint + 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 +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterOrExpression: Logical `Or` operator. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression struct { + // Expressions: The expressions that were ORed together. + Expressions []*GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterExpression `json:"expressions,omitempty"` + // ForceSendFields is a list of field names (e.g. "Expressions") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserAgent") to include in API + // NullFields is a list of field names (e.g. "Expressions") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterOrExpression return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningCancelOperationRequest: The request message for -// Operations.CancelOperation. -type GoogleLongrunningCancelOperationRequest struct { +// GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandi +// ngInfoStructuredExtractedFilterStringConstraint: Constraint expression of a +// string field. +type GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint struct { + // FieldName: Name of the string field as defined in the schema. + FieldName string `json:"fieldName,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"` + // ForceSendFields is a list of field names (e.g. "FieldName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FieldName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `json:"operations,omitempty"` +func (s GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseNaturalLanguageQueryUnderstandingInfoStructuredExtractedFilterStringConstraint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} - // 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo: +// Information describing query expansion including whether expansion has +// occurred. +type GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo struct { + // ExpandedQuery: Bool describing whether query expansion has occurred. + ExpandedQuery bool `json:"expandedQuery,omitempty"` + // PinnedResultCount: Number of pinned results. This field will only be set + // when expansion happens and + // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true. + PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "ExpandedQuery") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult: Represents the +// search results. +type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { + // Chunk: The chunk data in the search response if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + Chunk *GoogleCloudDiscoveryengineV1betaChunk `json:"chunk,omitempty"` + // Document: The document data snippet in the search response. Only fields that + // are marked as `retrievable` are populated. + Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` + // Id: Document.id of the searched Document. + Id string `json:"id,omitempty"` + // ModelScores: Google provided available scores. + ModelScores map[string]GoogleCloudDiscoveryengineV1betaDoubleList `json:"modelScores,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunk") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: 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 GoogleProtobufEmpty 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 +// GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo: Information about +// the session. +type GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo struct { + // Name: Name of the session. If the auto-session mode is used (when + // SearchRequest.session ends with "-"), this field holds the newly generated + // session name. + Name string `json:"name,omitempty"` + // QueryId: Query ID that corresponds to this search API call. One session can + // have multiple turns, each with a unique query ID. By specifying the session + // name and this query ID in the Answer API call, the answer generation happens + // in the context of the search results from this search call. + QueryId string `json:"queryId,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. "Code") to include in API requests + // 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 GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSessionInfo return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: 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 -type GoogleTypeDate struct { - // Day: 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. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without a year. - Year int64 `json:"year,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 +// GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the top N +// search results specified by the summary spec. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and their + // associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` + // SummarySkippedReasons: Additional summary-skipped reasons. This provides the + // reason for ignored cases. If nothing is skipped, this field is not set. + // + // Possible values: + // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary skipped + // reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. Only + // populated when SummarySpec.ignore_adversarial_query is set to `true`. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query + // ignored case. Only populated when + // SummarySpec.ignore_non_summary_seeking_query is set to `true`. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored case. + // Google skips the summary if there are no high-relevance search results. For + // example, the data store contains facts about company A but the user query is + // asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - 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. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google skips the + // summary if the LLM addon is not enabled. + SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` + // SummaryText: The summary content. + SummaryText string `json:"summaryText,omitempty"` + // SummaryWithMetadata: Summary with metadata information. + SummaryWithMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "SafetyAttributes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummary + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation: Citation info +// for a segment. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource `json:"sources,omitempty"` + // StartIndex: Index indicates the start of the segment, measured in + // bytes/unicode. + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata: +// Citation metadata. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struct { + // Citations: Citations for segments. + Citations []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation `json:"citations,omitempty"` + // ForceSendFields is a list of field names (e.g. "Citations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Citations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource: +// Citation source. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource struct { + // ReferenceIndex: Document reference index from + // SummaryWithMetadata.references. It is 0-indexed and the value will be zero + // if the reference_index is not set explicitly. + ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReferenceIndex") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference: Document +// reference. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference struct { + // ChunkContents: List of cited chunk contents derived from document content. + ChunkContents []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` + // Document: Required. Document.name of the document. Full resource name of the + // referenced document, in the format + // `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. + Document string `json:"document,omitempty"` + // Title: Title of the document. + Title string `json:"title,omitempty"` + // Uri: Cloud Storage or HTTP uri for the document. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkContents") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkContents") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent: +// Chunk content. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,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 GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes: +// Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories associated with + // the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` + // Scores: The confidence scores of the each category, higher value means + // higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` + // ForceSendFields is a list of field names (e.g. "Categories") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Categories") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata: +// Summary with metadata information. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata struct { + // CitationMetadata: Citation metadata for given summary. + CitationMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` + // References: Document References. + References []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference `json:"references,omitempty"` + // Summary: Summary text with no citation information. + Summary string `json:"summary,omitempty"` + // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://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 + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfig: Configures metadata that is +// used to generate serving time results (e.g. search results or recommendation +// predictions). The ServingConfig is passed in the search and predict request +// and generates results. +type GoogleCloudDiscoveryengineV1betaServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered boost + // controls will be applied. Boost controls must be in the same data store as + // the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The human readable serving config display name. Used + // in Discovery UI. This field must be a UTF-8 encoded string with a length + // limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + // DissociateControlIds: Condition do not associate specifications. If multiple + // do not associate conditions match, all matching do not associate controls in + // the list will execute. Order does not matter. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + // DiversityLevel: How much diversity to use in recommendation model results + // e.g. `medium-diversity` or `high-diversity`. Currently supported values: * + // `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` If not specified, we choose default based on recommendation + // model type. Default value: `no-diversity`. Can only be set if SolutionType + // is SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + // EmbeddingConfig: Bring your own embedding config. The config is used for + // search semantic retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embeddings that are provided by this EmbeddingConfig. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides + // this ServingConfig.embedding_config. + EmbeddingConfig *GoogleCloudDiscoveryengineV1betaEmbeddingConfig `json:"embeddingConfig,omitempty"` + // FilterControlIds: Filter controls to use in serving path. All triggered + // filter controls will be applied. Filter controls must be in the same data + // store as the serving config. Maximum of 20 filter controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig `json:"genericConfig,omitempty"` + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will execute. + // Order does not matter. Maximum number of specifications is 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig `json:"mediaConfig,omitempty"` + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a compatible + // model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required + // when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. If + // multiple oneway synonyms conditions match, all matching oneway synonyms + // controls in the list will execute. Maximum number of specifications is 100. + // Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. To leverage this, document embedding is required. The + // ranking expression setting in ServingConfig applies to all search requests + // served by the serving config. However, if SearchRequest.ranking_expression + // is specified, it overrides the ServingConfig ranking expression. The ranking + // expression is a single function or multiple functions that are joined by + // "+". * ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: * `relevance_score`: + // pre-defined keywords, used for measure relevance between query and document. + // * `embedding_field_path`: the document embedding field used with query + // embedding vector. * `dotProduct`: embedding function between + // embedding_field_path and query embedding vector. Example ranking expression: + // If document has an embedding field doc_embedding, the ranking expression + // could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + // RedirectControlIds: IDs of the redirect controls. Only the first triggered + // redirect action is applied, even if multiple apply. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can not be + // re-replaced. Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsControlIds: Condition synonyms specifications. If multiple synonyms + // conditions match, all matching synonyms controls in the list will execute. + // Maximum number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + // UpdateTime: Output only. ServingConfig updated timestamp. + 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. "BoostControlIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoostControlIds") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentSearchSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig: Specifies the +// configurations needed for Media Discovery. Currently we support: * +// `demote_content_watched`: Threshold for watched content demotion. Customers +// can specify if using watched content demotion or use viewed detail page. +// Using the content watched demotion, customers need to specify the watched +// minutes or percentage exceeds the threshold, the content will be demoted in +// the recommendation result. * `promote_fresh_content`: cutoff days for fresh +// content promotion. Customers can specify if using content freshness +// promotion. If the content was published within the cutoff days, the content +// will be promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were published + // for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + // ContentWatchedPercentageThreshold: Specifies the content watched percentage + // threshold for demotion. Threshold value must be between [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + // DemotionEventType: Specifies the event type used for demoting recommendation + // result. Currently supported values: * `view-item`: Item viewed. * + // `media-play`: Start/resume watching a video, playing a song, etc. * + // `media-complete`: Finished or stopped midway through a video, song, etc. If + // unset, watch history demotion will not be applied. Content freshness + // demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentFreshnessCutoffDays") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentFreshnessCutoffDays") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSession: External session proto definition. +type GoogleCloudDiscoveryengineV1betaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/engines/{engine + // }/sessions/*` + Name string `json:"name,omitempty"` + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1betaSessionTurn `json:"turns,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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 GoogleCloudDiscoveryengineV1betaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSession + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSessionTurn: Represents a turn, including a +// query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1betaSessionTurn struct { + // Answer: The resource name of the answer to the user query. Only set if the + // answer generation (/answer API call) happened in this turn. + Answer string `json:"answer,omitempty"` + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Answer") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSessionTurn + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteSearchEngine: SiteSearchEngine captures +// DataStore level site search persisting configurations. It is a singleton +// value per data store. +type GoogleCloudDiscoveryengineV1betaSiteSearchEngine struct { + // Name: The fully qualified resource name of the site search engine. Format: + // `projects/*/locations/*/dataStores/*/siteSearchEngine` + 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. "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 GoogleCloudDiscoveryengineV1betaSiteSearchEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteSearchEngine + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the ownership and + // validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website that + // opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "SiteVerificationState") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSpannerSource: The Spanner source for +// importing data +type GoogleCloudDiscoveryengineV1betaSpannerSource struct { + // DatabaseId: Required. The database ID of the source Spanner table. + DatabaseId string `json:"databaseId,omitempty"` + // EnableDataBoost: Whether to apply data boost on Spanner export. Enabling + // this option will incur additional cost. More info can be found here + // (https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + 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 string `json:"projectId,omitempty"` + // TableId: Required. The table name of the Spanner database that needs to be + // imported. + TableId string `json:"tableId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSpannerSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSpannerSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry: Suggestion deny +// list entry identifying the phrase to block from suggestions and the applied +// operation for the phrase. +type GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry struct { + // BlockPhrase: Required. Phrase to block from suggestions served. Can be + // maximum 125 characters. + BlockPhrase string `json:"blockPhrase,omitempty"` + // MatchOperator: Required. The match operator to apply for this phrase. + // Whether to block the exact phrase, or block any suggestions containing this + // phrase. + // + // Possible values: + // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used + // "EXACT_MATCH" - If the suggestion is an exact match to the block_phrase, + // then block it. + // "CONTAINS" - If the suggestion contains the block_phrase, then block it. + MatchOperator string `json:"matchOperator,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlockPhrase") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlockPhrase") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1betaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated to + // include all pages whose address contains the provided_uri_pattern. If set to + // true, an uri_pattern is generated to try to be an exact match of the + // provided_uri_pattern or just the specific page if the provided_uri_pattern + // is a specific one. provided_uri_pattern is always normalized to generate the + // URI pattern to be used by the search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` + // GeneratedUriPattern: Output only. This is system-generated based on the + // provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be picked up + // by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to be + // deleted. This is a transitioning state which will resulted in either: 1. + // target site deleted if unindexing is successful; 2. state reverts to + // SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + // Name: Output only. The fully qualified resource name of the target site. + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + // ProvidedUriPattern: Required. Input only. The user provided URI pattern from + // which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + // RootDomainUri: Output only. Root domain of the provided_uri_pattern. + RootDomainUri string `json:"rootDomainUri,omitempty"` + // SiteVerificationInfo: Output only. Site ownership and validity verification + // status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + // Type: The type of the target site, e.g., whether the site is to be included + // or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server behavior + // defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + // UpdateTime: Output only. The target site's last updated time. + 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. "ExactMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ExactMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "QuotaFailure") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: Failed +// due to insufficient quota. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total quota + // this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TotalRequiredQuota") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTextInput: Defines text input. +type GoogleCloudDiscoveryengineV1betaTextInput struct { + // Context: Conversation context of the input. + Context *GoogleCloudDiscoveryengineV1betaConversationContext `json:"context,omitempty"` + // Input: Text input. + Input string `json:"input,omitempty"` + // ForceSendFields is a list of field names (e.g. "Context") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Context") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTextInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTextInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata related +// to the progress of the TrainCustomModel operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata 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 GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest: Request message for +// SearchTuningService.TrainCustomModel method. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest struct { + // ErrorConfig: The desired location of errors incurred during the data + // ingestion and training. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // GcsTrainingInput: Cloud Storage training input. + GcsTrainingInput *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput `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 GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput: +// Cloud Storage training data input. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput 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 GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of the +// TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the request + // if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `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 GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTransactionInfo: A transaction represents +// the entire purchase transaction. +type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be manufacturing + // costs, shipping expenses not borne by the end user, or any other costs, such + // that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` + // DiscountValue: The total discount(s) value applied to this transaction. This + // figure should be excluded from TransactionInfo.value For example, if a user + // paid TransactionInfo.value amount, then nominal (pre-discount) value of the + // transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated the same + // way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than TransactionInfo.value: * + // Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` + // TransactionId: The transaction ID with a length limit of 128 characters. + TransactionId string `json:"transactionId,omitempty"` + // Value: Required. Total non-zero value associated with the transaction. This + // value may include shipping, tax, or other adjustments to the total value + // that you want to include. + Value float64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cost") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata associated with +// a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune applies to. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collection_id + // }/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + // ForceSendFields is a list of field names (e.g. "Engine") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineRequest: Request to manually start +// a tuning process now (instead of waiting for the periodically scheduled +// tuning to happen). +type GoogleCloudDiscoveryengineV1betaTuneEngineRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineResponse: Response associated with +// a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata 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 GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.UpdateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata 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 GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserEvent: UserEvent captures all metadata +// information Discovery Engine API needs to know about how end users interact +// with your website. +type GoogleCloudDiscoveryengineV1betaUserEvent struct { + // Attributes: Extra user event features to include in the recommendation + // model. These attributes must NOT contain data that needs to be parsed or + // processed further, e.g. JSON or other encodings. If you provide custom + // attributes for ingested user events, also include them in the user events + // that you associate with prediction requests. Custom attribute formatting + // must be consistent between imported events and events provided with + // prediction requests. This lets the Discovery Engine API use those custom + // attributes when training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be a UTF-8 + // encoded string with a length limit of 5,000 characters. * For text + // attributes, at most 400 values are allowed. Empty values are not allowed. + // Each value must be a UTF-8 encoded string with a length limit of 256 + // characters. * For number attributes, at most 400 values are allowed. For + // product recommendations, an example of extra user information is + // `traffic_channel`, which is how a user arrives at the site. Users can arrive + // at the site by coming to the site directly, coming through Google search, or + // in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1betaCustomAttribute `json:"attributes,omitempty"` + // AttributionToken: Token to attribute an API response to user action(s) to + // trigger the event. Highly recommended for user events that are the result of + // RecommendationService.Recommend. This field enables accurate attribution of + // recommendation model performance. The value must be one of: * + // RecommendResponse.attribution_token for events that are the result of + // RecommendationService.Recommend. * SearchResponse.attribution_token for + // events that are the result of SearchService.Search. This token enables us to + // accurately attribute page view or conversion completion back to the event + // and the particular predict response containing this clicked/purchased + // product. If user clicks on product K in the recommendation results, pass + // RecommendResponse.attribution_token as a URL parameter to product K's page. + // When recording events on product K's page, log the + // RecommendResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` + // CompletionInfo: CompletionService.CompleteQuery details related to the + // event. This field should be set for `search` event when autocomplete + // function is enabled and the user clicks a suggestion for search. + CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` + // DataStore: The DataStore resource full name, of the form + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. Optional. Only required for user events whose data + // store can't by determined by UserEvent.engine or UserEvent.documents. If + // data store is set in the parent of write/import/collect user event requests, + // this field can be omitted. + DataStore string `json:"dataStore,omitempty"` + // DirectUserRequest: Should set to true if the request is made directly from + // the end user, in which case the UserEvent.user_info.user_agent can be + // populated from the HTTP request. This flag should be set only if the API + // request is made directly from the end user such as a mobile app (and not if + // a gateway or a server is processing and pushing the user events). This + // should not be set when using the JavaScript tag in + // UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` + // Documents: List of Documents associated with this user event. This field is + // optional except for the following event types: * `view-item` * `add-to-cart` + // * `purchase` * `media-play` * `media-complete` In a `search` event, this + // field represents the documents returned to the end user on the current page + // (the end user may have not finished browsing the whole page yet). When a new + // page is returned to the end user, after pagination/filtering/ordering even + // for the same query, a new `search` event with different UserEvent.documents + // is desired. + Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` + // Engine: The Engine resource name, in the form of + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}`. Optional. Only required for Engine produced user events. For + // example, user events from blended search. + Engine string `json:"engine,omitempty"` + // EventTime: Only required for UserEventService.ImportUserEvents method. + // Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` + // EventType: Required. User event type. Allowed values are: Generic values: * + // `search`: Search for Documents. * `view-item`: Detailed page view of a + // Document. * `view-item-list`: View of a panel or ordered list of Documents. + // * `view-home-page`: View of the home page. * `view-category-page`: View of a + // category page, e.g. Home > Men > Jeans Retail-related values: * + // `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping * + // `purchase`: Purchase an item(s) Media-related values: * `media-play`: + // Start/resume watching a video, playing a song, etc. * `media-complete`: + // Finished or stopped midway through a video, song, etc. + EventType string `json:"eventType,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents being + // filtered. One example is for `search` events, the associated SearchRequest + // may contain a filter expression in SearchRequest.filter conforming to + // https://google.aip.dev/160#filtering. Similarly, for `view-item-list` events + // that are generated from a RecommendRequest, this field may be populated + // directly from RecommendRequest.filter conforming to + // https://google.aip.dev/160#filtering. The value must be a UTF-8 encoded + // string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + Filter string `json:"filter,omitempty"` + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1betaMediaInfo `json:"mediaInfo,omitempty"` + // PageInfo: Page metadata such as categories and other critical information + // for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1betaPageInfo `json:"pageInfo,omitempty"` + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1betaPanelInfo `json:"panel,omitempty"` + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + // SearchInfo: SearchService.Search details related to the event. This field + // should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1betaSearchInfo `json:"searchInfo,omitempty"` + // SessionId: A unique identifier for tracking a visitor session with a length + // limit of 128 bytes. A session is an aggregation of an end user behavior in a + // time span. A general guideline to populate the session_id: 1. If user has no + // activity for 30 min, a new session_id should be assigned. 2. The session_id + // should be unique across users, suggest use uuid or add + // UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + // TagIds: A list of identifiers for the independent experiment groups this + // user event belongs to. This is used to distinguish between user events + // associated with different experiment setups. + TagIds []string `json:"tagIds,omitempty"` + // TransactionInfo: The transaction metadata (if any) associated with this user + // event. + TransactionInfo *GoogleCloudDiscoveryengineV1betaTransactionInfo `json:"transactionInfo,omitempty"` + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // UserPseudoId: Required. A unique identifier for tracking visitors. For + // example, this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique identifier + // should not change if the visitor log in/out of the website. Do not set the + // field to the same fixed ID for different users. This mixes the event history + // of those users together, which results in degraded model quality. The field + // must be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. The field should not + // contain PII or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Attributes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Attributes") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserEvent + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1betaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must be a + // UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. This should not be set when using the + // client side event reporting with GTM or JavaScript tag in + // UserEventService.CollectUserEvent or if UserEvent.direct_user_request is + // set. + UserAgent string `json:"userAgent,omitempty"` + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. Always + // use a hashed value for this ID. Don't set the field to the same fixed ID for + // different users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserId string `json:"userId,omitempty"` + // ForceSendFields is a list of field names (e.g. "UserAgent") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "UserAgent") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningCancelOperationRequest: The request message for +// Operations.CancelOperation. +type GoogleLongrunningCancelOperationRequest struct { +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse 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 []*GoogleLongrunningOperation `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 GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation 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 GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: 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 GoogleProtobufEmpty 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) +} + +// GoogleTypeDate: 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 +type GoogleTypeDate struct { + // Day: 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. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,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 GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsProvisionCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Provision: Provisions the project resource. During the process, related +// systems will get prepared and initialized. Caller must read the Terms for +// data use (https://cloud.google.com/retail/data-use-terms), and optionally +// specify in request to provide consent to that service terms. +// +// - name: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) *ProjectsProvisionCall { + c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaprovisionprojectrequest = googleclouddiscoveryenginev1betaprovisionprojectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsProvisionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsProvisionCall) 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.googleclouddiscoveryenginev1betaprovisionprojectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:provision") + 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 "discoveryengine.projects.provision" 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 *ProjectsProvisionCall) 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 ProjectsLocationsCollectionsDataConnectorOperationsGetCall 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 *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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/{+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.collections.dataConnector.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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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 ProjectsLocationsCollectionsDataConnectorOperationsListCall 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 *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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/{+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.collections.dataConnector.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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword suggestions. +// +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) 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/{+dataStore}:completeQuery") + 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.completeQuery" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, 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 := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + 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 ProjectsLocationsCollectionsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To serve +// these documents for Search, or Recommendation use case, an Engine needs to +// be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { + c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user want to +// directly create an advanced data store for site search. If the data store is +// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE +// content_config), this flag will be ignored. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) 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.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + 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 "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresCreateCall) 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 ProjectsLocationsCollectionsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresDeleteCall{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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.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 *ProjectsLocationsCollectionsDataStoresDeleteCall) 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 ProjectsLocationsCollectionsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { + c := &ProjectsLocationsCollectionsDataStoresGetCall{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 *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { + 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 *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetCall) 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/{+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.collections.dataStores.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, 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 := &GoogleCloudDiscoveryengineV1betaDataStore{ + 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 ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + 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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) 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/{+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.collections.dataStores.getSiteSearchEngine" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, 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 := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + 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 ProjectsLocationsCollectionsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. If +// the caller does not have permission to list DataStores under this +// location, regardless of whether or not this data store exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { + c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type . For +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` +func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { + 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 *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresListCall) 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}/dataStores") + 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.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, 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 := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + 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 *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) 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 ProjectsLocationsCollectionsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { + c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) 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.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, 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 := &GoogleCloudDiscoveryengineV1betaDataStore{ + 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 ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { + s *Service + dataStore string + googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest + 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, googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1betatraincustommodelrequest = googleclouddiscoveryenginev1betatraincustommodelrequest + return 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.googleclouddiscoveryenginev1betatraincustommodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID to use +// for the Document, which becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) 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/{+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.collections.dataStores.branches.documents.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1betaimportdocumentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) 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}/documents") + 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.documents.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, 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 := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 := &GoogleCloudDiscoveryengineV1betaDocument{ + 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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.googleclouddiscoveryenginev1betapurgedocumentsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") + 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) 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 ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.branches.operations.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) 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 ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) 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/{+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.collections.dataStores.branches.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) 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 ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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/{+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.collections.dataStores.branches.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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 ProjectsProvisionCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Provision: Provisions the project resource. During the process, related -// systems will get prepared and initialized. Caller must read the Terms for -// data use (https://cloud.google.com/retail/data-use-terms), and optionally -// specify in request to provide consent to that service terms. +// Import: Imports CompletionSuggestions for a DataStore. // -// - name: Full resource name of a Project, such as -// `projects/{project_id_or_number}`. -func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) *ProjectsProvisionCall { - c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaprovisionprojectrequest = googleclouddiscoveryenginev1betaprovisionprojectrequest +// - parent: The parent data store resource name for which to import customer +// autocomplete suggestions. Follows pattern +// `projects/*/locations/*/collections/*/dataStores/*`. +func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { + c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsProvisionCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1betaprovisionprojectrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:provision") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/completionSuggestions:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15064,18 +19788,18 @@ func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { } 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 "discoveryengine.projects.provision" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.import" 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 *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15107,85 +19831,79 @@ func (c *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrun return ret, nil } -type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + 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. +// Purge: Permanently deletes all CompletionSuggestions for a DataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to purge completion +// suggestions. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/completionSuggestions:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.purge" 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15217,104 +19935,92 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + 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`. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresControlsCreateCall) 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.googleclouddiscoveryenginev1betacontrol) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15333,7 +20039,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15346,100 +20052,129 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { - s *Service - dataStore string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword suggestions. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c.ctx_ = ctx return c } -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) 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, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.controls.delete" 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 *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) 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 ProjectsLocationsCollectionsDataStoresControlsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Control. +// +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15447,27 +20182,27 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15475,7 +20210,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15483,18 +20218,18 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15513,7 +20248,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15526,83 +20261,93 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To serve -// these documents for Search, or Recommendation use case, an Engine needs to -// be created separately. +// List: Lists all Controls by their parent DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { - c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user want to -// directly create an advanced data store for site search. If the data store is -// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE -// content_config), this flag will be ignored. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("filter", filter) return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + 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 *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) 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.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) 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}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15613,13 +20358,13 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.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 -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15638,7 +20383,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15651,59 +20396,92 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsCollectionsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a DataStore. +type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) 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.googleclouddiscoveryenginev1betacontrol) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -15714,13 +20492,13 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.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 +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15739,7 +20517,7 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15752,71 +20530,66 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsCollectionsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Converse: Converses a conversation. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { - c := &ProjectsLocationsCollectionsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { 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 *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15827,13 +20600,13 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15852,7 +20625,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15865,87 +20638,80 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { 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 *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15964,7 +20730,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15977,116 +20743,74 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { - c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` -func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { 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 *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) 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}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { +// *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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16105,7 +20829,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16118,92 +20842,68 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) 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 *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) 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 ProjectsLocationsCollectionsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Get: Gets a Conversation. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { - c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DataStore to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { - 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 *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) 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.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) 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/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -16214,13 +20914,13 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16239,7 +20939,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16252,80 +20952,117 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { - s *Service - dataStore string - googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Conversations by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// 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, googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { - c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - c.googleclouddiscoveryenginev1betatraincustommodelrequest = googleclouddiscoveryenginev1betatraincustommodelrequest +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.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 { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) 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.googleclouddiscoveryenginev1betatraincustommodelrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) 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/{+dataStore}:trainCustomModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") 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{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.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 -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16344,7 +21081,7 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16357,92 +21094,111 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) 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) + } } -// Create: Creates a Document. +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) 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.googleclouddiscoveryenginev1betadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16461,7 +21217,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16474,76 +21230,86 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresCustomModelsListCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// List: Gets a list of all the custom models. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +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, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}/customModels") 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{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse.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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListCustomModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16562,7 +21328,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaListCustomModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16575,7 +21341,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16584,16 +21350,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { header_ http.Header } -// Get: Gets a Document. +// 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: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16601,7 +21364,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16609,27 +21372,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields( // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16650,13 +21413,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16675,7 +21438,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16688,81 +21451,104 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1betaimportdocumentsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.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 +// *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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16781,7 +21567,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16794,53 +21580,51 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Documents. +// 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. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16848,27 +21632,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16876,7 +21660,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16884,18 +21668,18 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ } 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 "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse.Header -// 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16914,7 +21698,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16927,99 +21711,87 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) 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 ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17030,13 +21802,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17055,7 +21827,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17068,65 +21840,90 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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) + } } -// Purge: Permanently deletes all selected Documents in a branch. This process -// is asynchronous. Depending on the number of Documents to be deleted, this -// operation can take hours to complete. Before the delete operation completes, -// some Documents might still be returned by DocumentService.GetDocument or -// DocumentService.ListDocuments. To get a list of the Documents to be deleted, -// set PurgeDocumentsRequest.force to false. +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Schema. // -// - parent: The parent resource name, such as +// - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// SchemaId sets the optional parameter "schemaId": Required. The ID to use for +// the Schema, which becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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.googleclouddiscoveryenginev1betapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17139,13 +21936,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17177,68 +21974,56 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall 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 Schema. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) 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, "v1beta/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -17249,13 +22034,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17274,7 +22059,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17287,7 +22072,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsCancelCall) Do( return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17296,13 +22081,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { 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. +// Get: Gets a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17310,7 +22095,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(na // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17318,27 +22103,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17359,13 +22144,13 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 +// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17384,7 +22169,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17397,41 +22182,40 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasListCall 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: Gets a list of Schemas. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17439,7 +22223,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17447,27 +22231,27 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17475,7 +22259,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17483,18 +22267,18 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq } 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 "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17513,7 +22297,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17529,7 +22313,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op // 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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17547,79 +22331,88 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports CompletionSuggestions for a DataStore. +// Patch: Updates a Schema. // -// - parent: The parent data store resource name for which to import customer -// autocomplete suggestions. Follows pattern -// `projects/*/locations/*/collections/*/dataStores/*`. -func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { - c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/completionSuggestions:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17651,79 +22444,85 @@ func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsImportCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all CompletionSuggestions for a DataStore. +// 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. // -// - parent: The parent data store resource name for which to purge completion -// suggestions. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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}/completionSuggestions:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.completionSuggestions.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17755,92 +22554,104 @@ func (c *ProjectsLocationsCollectionsDataStoresCompletionSuggestionsPurgeCall) D return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { - c.urlParams_.Set("controlId", controlId) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) 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.googleclouddiscoveryenginev1betacontrol) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.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 *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17859,7 +22670,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17869,77 +22680,106 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...go if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Control. If the Control to delete does not exist, a -// NOT_FOUND error is returned. +// Answer: Answer query method. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" 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 *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17958,7 +22798,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17971,7 +22811,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17980,13 +22820,14 @@ type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { - c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17994,7 +22835,7 @@ func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18002,27 +22843,27 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18043,13 +22884,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18068,7 +22909,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18081,7 +22922,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresControlsListCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18090,38 +22931,29 @@ type ProjectsLocationsCollectionsDataStoresControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { - c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { - c.urlParams_.Set("filter", filter) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18129,7 +22961,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18137,27 +22969,27 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...goo // 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18165,7 +22997,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18178,13 +23010,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18203,7 +23035,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18219,7 +23051,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...goog // 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 *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18237,32 +23069,32 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx conte } } -type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // // - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -18270,30 +23102,30 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(upd // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) 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.googleclouddiscoveryenginev1betacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } @@ -18312,13 +23144,13 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18337,7 +23169,7 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18350,64 +23182,66 @@ func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18415,18 +23249,18 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18445,7 +23279,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18458,61 +23292,190 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Search: Performs a search. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1betasearchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, 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 := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.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.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} // /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18525,13 +23488,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18550,7 +23513,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18563,7 +23526,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18571,14 +23534,14 @@ type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: +// - name: The resource name of the Session to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18586,27 +23549,27 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -18624,13 +23587,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" 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 *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18662,7 +23625,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18671,13 +23634,13 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Session. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Session to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18685,7 +23648,7 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18693,27 +23656,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18734,13 +23697,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18759,7 +23722,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18772,7 +23735,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18781,13 +23744,13 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} // /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -18795,7 +23758,7 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent // Filter sets the optional parameter "filter": A filter to apply on the list // results. The supported features are: user_pseudo_id, state. Example: // "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -18803,23 +23766,23 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(fil // 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": Maximum number of results // to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18827,7 +23790,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18835,27 +23798,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18863,7 +23826,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18876,13 +23839,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18901,7 +23864,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18917,7 +23880,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. // 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 *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18935,34 +23898,32 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -18970,30 +23931,30 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) 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.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } @@ -19012,124 +23973,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, 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 := &GoogleCloudDiscoveryengineV1betaConversation{ - 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 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, "v1beta/{+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 -// *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse.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 *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListCustomModelsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19148,7 +23998,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListCustomModelsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19161,7 +24011,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19170,13 +24020,13 @@ type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { 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. +// Get: Gets a Answer. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19184,7 +24034,7 @@ func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19192,27 +24042,27 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19233,13 +24083,13 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.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 +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19258,7 +24108,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19271,104 +24121,80 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + 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`. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. This +// API sends all the target sites under site search engine for verification. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The parent resource shared by all TargetSites being verified. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" 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 +// *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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19387,7 +24213,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19400,106 +24226,80 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + 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. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19531,104 +24331,80 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + 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`. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) + if err != nil { + return nil, err } - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" 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 +// *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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19647,7 +24423,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19660,109 +24436,108 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// FetchDomainVerificationStatus: Returns list of target sites with its domain +// verification status. This method can only be called under data store with +// BASIC_SITE_SEARCH state at the moment. // -// - parent: The parent data store resource name, in the format of +// - siteSearchEngine: The site search engine resource under which we fetch all +// the domain verification status. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `FetchDomainVerificationStatus` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to `FetchDomainVerificationStatus` must match the call that provided the +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) 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}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.Server +// Response.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19781,7 +24556,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19794,73 +24569,99 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Schema. +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1betarecrawlurisrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19892,7 +24693,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19901,13 +24702,13 @@ type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// 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 full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19915,7 +24716,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19923,27 +24724,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googl // 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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19964,13 +24765,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSchema.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 *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19989,7 +24790,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20002,40 +24803,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Schemas. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20043,7 +24845,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20051,27 +24853,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...goog // 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20079,7 +24881,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20087,18 +24889,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st } 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 "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20117,7 +24919,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20133,7 +24935,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl // 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 *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20151,198 +24953,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx contex } } -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// BatchCreate: Creates TargetSite in a batch. // -// - name: Immutable. The full resource name of the schema, in the format of +// - parent: The parent resource shared by all TargetSites being created. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.schemas.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 *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) 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 ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20374,104 +25058,79 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Create: Creates a TargetSite. +// +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1betatargetsite) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" 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 +// *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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20490,7 +25149,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20503,103 +25162,76 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt 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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Delete: Deletes a TargetSite. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{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 *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) 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.googleclouddiscoveryenginev1betaanswerqueryrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header -// 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 *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20618,7 +25250,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20631,7 +25263,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20640,14 +25272,16 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// Get: Gets a TargetSite. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20655,7 +25289,7 @@ func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20663,27 +25297,27 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20704,13 +25338,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20729,7 +25363,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20742,7 +25376,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -20751,29 +25385,34 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Gets a list of TargetSites. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to list TargetSites under this site search engine, regardless of whether +// or not this branch exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +// from a previous `ListTargetSites` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListTargetSites` must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20781,7 +25420,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20789,27 +25428,27 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20817,7 +25456,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20830,13 +25469,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20855,7 +25494,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20871,7 +25510,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . // 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20889,63 +25528,55 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Patch: Updates a TargetSite. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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.googleclouddiscoveryenginev1betaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } @@ -20964,13 +25595,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.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 *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20989,7 +25620,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21002,85 +25633,85 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// 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. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21099,7 +25730,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21112,209 +25743,104 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c.ctx_ = ctx +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") - 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{ - "servingConfig": c.servingConfig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, 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 := &GoogleCloudDiscoveryengineV1betaSearchResponse{ - 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.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.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken - } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1betasession) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21333,7 +25859,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21346,74 +25872,100 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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) + } } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) 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.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") 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 "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" 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 *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21432,7 +25984,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21445,85 +25997,79 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Session. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { 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 *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21542,7 +26088,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21555,7 +26101,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21564,53 +26110,48 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21618,27 +26159,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...goo // 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21646,7 +26187,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21659,13 +26200,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21684,7 +26225,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21697,109 +26238,83 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) 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 ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21818,7 +26333,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21831,85 +26346,90 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Answer. +// Write: Writes a single user event. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent + return c +} + +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { 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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1betauserevent) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21928,7 +26448,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswer{ + ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21941,61 +26461,69 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. This -// API sends all the target sites under site search engine for verification. +// Create: Creates a Engine. // -// - parent: The parent resource shared by all TargetSites being verified. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// EngineId sets the optional parameter "engineId": Required. The ID to use for +// the Engine, which will become the final component of the Engine's resource +// name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) 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.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22008,13 +26536,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22046,80 +26574,76 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +// Delete: Deletes a Engine. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. If the caller does not have permission to delete the +// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the Engine to delete does not exist, a NOT_FOUND error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) 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.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22151,80 +26675,85 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +// Get: Gets a Engine. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { 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 *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesGetCall) 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/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22243,7 +26772,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22256,45 +26785,40 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its domain -// verification status. This method can only be called under data store with -// BASIC_SITE_SEARCH state at the moment. +// List: Lists all the Engines associated with the project. // -// - siteSearchEngine: The site search engine resource under which we fetch all -// the domain verification status. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent 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. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +// Filter sets the optional parameter "filter": Filter by solution type. For +// example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `FetchDomainVerificationStatus` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to `FetchDomainVerificationStatus` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -22302,7 +26826,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22310,27 +26834,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22338,7 +26862,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22346,18 +26870,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.Server -// Response.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22376,7 +26900,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22392,7 +26916,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -22410,78 +26934,90 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// Patch: Updates an Engine // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest +// - name: Immutable. The fully qualified resource name of the engine. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}` engine should be 1-63 characters, and valid characters are +// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Engine to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) 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.googleclouddiscoveryenginev1betarecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.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 +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22500,7 +27036,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22513,68 +27049,63 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest + urlParams_ gensupport.URLParams + 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. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betapauseenginerequest = googleclouddiscoveryenginev1betapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesPauseCall) 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.googleclouddiscoveryenginev1betapauseenginerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:pause") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22585,13 +27116,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" 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 +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22610,7 +27141,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22623,87 +27154,63 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest + urlParams_ gensupport.URLParams + 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`. +// Resume: Resumes the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1betaresumeenginerequest = googleclouddiscoveryenginev1betaresumeenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesResumeCall) 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.googleclouddiscoveryenginev1betaresumeenginerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22714,13 +27221,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22739,7 +27246,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22752,82 +27259,61 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. // -// - parent: The parent resource shared by all TargetSites being created. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatuneenginerequest = googleclouddiscoveryenginev1betatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) 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.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatuneenginerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22835,18 +27321,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } 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 "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22878,60 +27364,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) 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.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22944,13 +27443,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22969,7 +27468,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22982,7 +27481,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22990,16 +27489,14 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall header_ http.Header } -// Delete: Deletes a TargetSite. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23007,27 +27504,27 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -23045,13 +27542,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23070,7 +27567,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23083,7 +27580,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { +type ProjectsLocationsCollectionsEnginesControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23092,16 +27589,13 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall st header_ http.Header } -// Get: Gets a TargetSite. +// Get: Gets a Control. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23109,7 +27603,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23117,27 +27611,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23158,13 +27652,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23183,7 +27677,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23196,7 +27690,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsCollectionsEnginesControlsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23205,34 +27699,38 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall s header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists all Controls by their parent DataStore. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to list TargetSites under this site search engine, regardless of whether -// or not this branch exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent 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. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListTargetSites` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListTargetSites` must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23240,7 +27738,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23248,27 +27746,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23276,7 +27774,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23289,13 +27787,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in error.(*googleapi.Error).Header. +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23314,7 +27812,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23330,7 +27828,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23348,55 +27846,63 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) 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.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } @@ -23415,13 +27921,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.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 +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23440,7 +27946,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23453,68 +27959,66 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + 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. +// Converse: Converses a conversation. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -23525,13 +28029,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23550,7 +28054,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23563,104 +28067,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + 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`. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23679,7 +28159,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23692,100 +28172,74 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) 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.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } 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 "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23804,7 +28258,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23817,79 +28271,85 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return ret, nil } -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +// Get: Gets a Conversation. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { 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 *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) 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}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.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 +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23908,7 +28368,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23921,7 +28381,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -23930,48 +28390,53 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party domain. -// This method is used only by the Discovery Engine API JavaScript pixel and -// Google Tag Manager. Users should not call this method directly. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) +// 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23979,27 +28444,27 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24007,7 +28472,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24020,13 +28485,13 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24045,7 +28510,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24058,83 +28523,111 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest - 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) 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) + } } -// Import: Bulk import of user events. Request processing might be synchronous. -// Events that already exist are skipped. Use this method for backfilling -// historical user events. Operation.response is of type ImportResponse. Note -// that it is possible for a subset of the items to be successfully inserted. -// Operation.metadata is of type ImportMetadata. +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) 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.googleclouddiscoveryenginev1betaimportusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.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 +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24153,7 +28646,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24166,90 +28659,85 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// 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. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent - return c -} - -// WriteAsync sets the optional parameter "writeAsync": If set to true, the -// user event is written asynchronously after validation, and the API responds -// without waiting for the write. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1betauserevent) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaUserEvent.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 *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24268,7 +28756,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24281,88 +28769,104 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsListCall 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 *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -// Create: Creates a Engine. -// -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// EngineId sets the optional parameter "engineId": Required. The ID to use for -// the Engine, which will become the final component of the Engine's resource -// name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { - c.urlParams_.Set("engineId", engineId) +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + 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 *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesCreateCall) 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.googleclouddiscoveryenginev1betaengine) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.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 +// *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 *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24381,7 +28885,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24394,76 +28898,103 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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) + } } -// Delete: Deletes a Engine. +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Answer: Answer query method. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. If the caller does not have permission to delete the -// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the Engine to delete does not exist, a NOT_FOUND error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" 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 +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24482,7 +29013,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24495,7 +29026,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesGetCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24504,13 +29035,14 @@ type ProjectsLocationsCollectionsEnginesGetCall struct { header_ http.Header } -// Get: Gets a Engine. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24518,7 +29050,7 @@ func (r *ProjectsLocationsCollectionsEnginesService) Get(name 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 *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24526,27 +29058,27 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) 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 *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24567,13 +29099,13 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24592,7 +29124,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24605,7 +29137,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsCollectionsEnginesListCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24614,31 +29146,29 @@ type ProjectsLocationsCollectionsEnginesListCall struct { header_ http.Header } -// List: Lists all the Engines associated with the project. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { - c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter by solution type. For -// example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24646,7 +29176,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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 *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24654,27 +29184,27 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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 *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24682,7 +29212,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) 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, "v1beta/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24695,13 +29225,13 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24720,7 +29250,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24736,7 +29266,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // 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 *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -24754,34 +29284,32 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, } } -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: Immutable. The fully qualified resource name of the engine. This -// field must be a UTF-8 encoded string with a length limit of 1024 -// characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are -// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Engine to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -24789,30 +29317,30 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) 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.googleclouddiscoveryenginev1betaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } @@ -24831,118 +29359,13 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, 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 := &GoogleCloudDiscoveryengineV1betaEngine{ - 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 ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -// -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betapauseenginerequest = googleclouddiscoveryenginev1betapauseenginerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesPauseCall) 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.googleclouddiscoveryenginev1betapauseenginerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}: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{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24961,7 +29384,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24974,61 +29397,66 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaresumeenginerequest = googleclouddiscoveryenginev1betaresumeenginerequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betaresumeenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25036,18 +29464,18 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25066,7 +29494,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25079,61 +29507,64 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. -// -// - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betatuneenginerequest = googleclouddiscoveryenginev1betatuneenginerequest +// Search: Performs a search. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) 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.googleclouddiscoveryenginev1betatuneenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25141,18 +29572,18 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" 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 +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25171,7 +29602,7 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25184,73 +29615,82 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsCreateCall 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.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.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // // - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { - c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol - return c -} - -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { - c.urlParams_.Set("controlId", controlId) + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) 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.googleclouddiscoveryenginev1betacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25263,13 +29703,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25288,7 +29728,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25301,7 +29741,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25309,14 +29749,14 @@ type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Control. If the Control to delete does not exist, a +// Delete: Deletes a Session. If the Session to delete does not exist, a // NOT_FOUND error is returned. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25324,27 +29764,27 @@ func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -25362,13 +29802,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" 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 *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25400,7 +29840,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25409,13 +29849,13 @@ type ProjectsLocationsCollectionsEnginesControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a Session. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { - c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -25423,7 +29863,7 @@ func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name 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 *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25431,27 +29871,27 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googlea // 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 *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25472,13 +29912,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25497,7 +29937,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25510,7 +29950,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesControlsListCall struct { +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -25519,38 +29959,45 @@ type ProjectsLocationsCollectionsEnginesControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { - c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { 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: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of results // to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent +// from a previous `ListSessions` call. Provide this to retrieve the subsequent // page. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25558,7 +30005,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25566,27 +30013,27 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...google // 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 *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25594,7 +30041,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25607,13 +30054,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25632,7 +30079,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25648,7 +30095,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googlea // 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 *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -25666,32 +30113,32 @@ func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context. } } -type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { s *Service name string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { - c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -25699,30 +30146,30 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(update // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) 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.googleclouddiscoveryenginev1betacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } @@ -25741,13 +30188,13 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25766,7 +30213,7 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25779,270 +30226,68 @@ func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Get: Gets a Answer. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// - name: The resource name of the Answer to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") - 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 "discoveryengine.projects.locations.collections.engines.conversations.converse" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, 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 := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ - 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 ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") - 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 "discoveryengine.projects.locations.collections.engines.conversations.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, 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 := &GoogleCloudDiscoveryengineV1betaConversation{ - 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 ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. -// -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) 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/{+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 } @@ -26053,13 +30298,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" 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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26078,7 +30323,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26091,7 +30336,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26100,13 +30345,13 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// 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 resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26114,7 +30359,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26122,27 +30367,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...go // 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 *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26163,13 +30408,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.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 *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26188,7 +30433,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26201,54 +30446,41 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26256,7 +30488,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26264,27 +30496,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...g // 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26292,7 +30524,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26300,18 +30532,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt } 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 "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, 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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26330,7 +30562,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26346,7 +30578,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -26364,90 +30596,134 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx con } } -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// CompleteQuery: Completes the specified user input with keyword suggestions. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { 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 *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) 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.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresCompleteQueryCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") 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, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26466,7 +30742,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26479,85 +30755,100 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + 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. +// Create: Creates a DataStore. DataStore is for storing Documents. To serve +// these documents for Search, or Recommendation use case, an Engine needs to +// be created separately. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user want to +// directly create an advanced data store for site search. If the data store is +// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE +// content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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 *ProjectsLocationsDataStoresCreateCall) 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.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26589,87 +30880,59 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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`. +// Delete: Deletes a DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -26680,13 +30943,13 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.delete" 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 +// *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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26705,7 +30968,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26718,103 +30981,88 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Get: Gets a DataStore. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { 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 *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1betaanswerqueryrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresGetCall) 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/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26833,7 +31081,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26846,7 +31094,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26855,14 +31103,15 @@ type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26870,7 +31119,7 @@ func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26878,27 +31127,27 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...g // 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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26919,13 +31168,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26944,7 +31193,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26957,7 +31206,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { +type ProjectsLocationsDataStoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -26966,29 +31215,42 @@ type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Lists all the DataStores associated with the project. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. If +// the caller does not have permission to list DataStores under this +// location, regardless of whether or not this data store exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +// Filter sets the optional parameter "filter": Filter by solution type . For +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26996,7 +31258,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27004,27 +31266,27 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27032,7 +31294,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27045,13 +31307,15 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27070,7 +31334,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27086,7 +31350,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g // 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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27104,32 +31368,32 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx co } } -type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Patch: Updates a DataStore // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -27137,30 +31401,30 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresPatchCall) 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.googleclouddiscoveryenginev1betaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) if err != nil { return nil, err } @@ -27179,13 +31443,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27204,7 +31468,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27217,174 +31481,73 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Create: Creates a Document. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c.ctx_ = ctx +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") - 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{ - "servingConfig": c.servingConfig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, 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 := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ - 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 ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Search: Performs a search. -// -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// DocumentId sets the optional parameter "documentId": Required. The ID to use +// for the Document, which becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1betasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27392,18 +31555,18 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27422,7 +31585,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27435,101 +31598,76 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.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.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Delete: Deletes a Document. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { - c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{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 *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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.googleclouddiscoveryenginev1betasession) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } 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 "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +// *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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27548,7 +31686,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27561,22 +31699,25 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Get: Gets a Document. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27584,34 +31725,45 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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/{+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 } @@ -27622,13 +31774,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" 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 *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27647,7 +31799,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27655,90 +31807,86 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl } target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header + return nil, err + } + return ret, nil } -// Get: Gets a Session. +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { 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 *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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.googleclouddiscoveryenginev1betaimportdocumentsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27757,7 +31905,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27770,7 +31918,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsListCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -27779,45 +31927,36 @@ type ProjectsLocationsCollectionsEnginesSessionsListCall struct { header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Gets a list of Documents. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27825,7 +31964,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27833,27 +31972,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...google // 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 *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27861,7 +32000,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27874,13 +32013,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27899,7 +32038,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27915,7 +32054,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea // 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 *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27933,32 +32072,39 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context. } } -type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Document. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -27966,30 +32112,30 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(update // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) if err != nil { return nil, err } @@ -28008,13 +32154,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28033,7 +32179,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28046,195 +32192,84 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Answer. +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { 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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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.collections.engines.sessions.answers.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1betaAnswer{ - 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 ProjectsLocationsCollectionsOperationsGetCall 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 *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{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 *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { - 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 *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsOperationsGetCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" 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 *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28266,87 +32301,68 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + 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`. +// 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's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) + 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 *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { 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 *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsListCall) 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -28357,13 +32373,13 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" 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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28373,122 +32389,52 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca 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 *ProjectsLocationsCollectionsOperationsListCall) 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) + }) + } + 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 ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service - dataStore string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword suggestions. +// 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. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{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 *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28496,27 +32442,27 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) 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 *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28524,7 +32470,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) 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, "v1beta/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28532,18 +32478,18 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse.Header -// 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 *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28562,7 +32508,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28575,100 +32521,104 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To serve -// these documents for Search, or Recommendation use case, an Engine needs to -// be created separately. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user want to -// directly create an advanced data store for site search. If the data store is -// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE -// content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + 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 *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) 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.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.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 +// *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 *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28687,7 +32637,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28700,76 +32650,100 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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) + } } -// Delete: Deletes a DataStore. +type ProjectsLocationsDataStoresCompletionSuggestionsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Imports CompletionSuggestions for a DataStore. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import customer +// autocomplete suggestions. Follows pattern +// `projects/*/locations/*/collections/*/dataStores/*`. +func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { + c := &ProjectsLocationsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/completionSuggestions:import") 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 "discoveryengine.projects.locations.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.import" 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 *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28801,88 +32775,79 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Purge: Permanently deletes all CompletionSuggestions for a DataStore. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to purge completion +// suggestions. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { + c := &ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { 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 *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) 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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/completionSuggestions:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.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 *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28901,7 +32866,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28914,87 +32879,92 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - name: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsCreateCall { + c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsDataStoresControlsCreateCall) 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.googleclouddiscoveryenginev1betacontrol) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29013,7 +32983,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29026,116 +32996,74 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { + c := &ProjectsLocationsDataStoresControlsDeleteCall{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 *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { - 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 *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { - c.ifNoneMatch_ = entityTag +// details. +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) 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}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { +// *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 *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29154,7 +33082,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29167,92 +33095,68 @@ func (c *ProjectsLocationsDataStoresListCall) 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 *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) 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 ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Get: Gets a Control. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { + c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DataStore to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - 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 *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { 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 *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresPatchCall) 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.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresControlsGetCall) 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/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29263,13 +33167,13 @@ func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29288,7 +33192,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29301,75 +33205,93 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// List: Lists all Controls by their parent DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}` or +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { + c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { 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 *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresControlsListCall) 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}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29380,13 +33302,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29405,7 +33327,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29418,59 +33340,92 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Document. +type ProjectsLocationsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsPatchCall { + c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresControlsPatchCall) 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.googleclouddiscoveryenginev1betacontrol) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -29481,13 +33436,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29506,7 +33461,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29519,71 +33474,66 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Document. +// Converse: Converses a conversation. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to access the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the requested -// Document does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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 *ProjectsLocationsDataStoresConversationsConverseCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -29594,13 +33544,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29619,7 +33569,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29632,62 +33582,61 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1betaimportdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29700,13 +33649,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.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 +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29725,7 +33674,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29738,108 +33687,74 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Documents. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) 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}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +// *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 *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29858,7 +33773,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29871,99 +33786,68 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google 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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) 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 ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Get: Gets a Conversation. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { 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 *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresConversationsGetCall) 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/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29974,13 +33858,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29999,7 +33883,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30012,67 +33896,100 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This process -// is asynchronous. Depending on the number of Documents to be deleted, this -// operation can take hours to complete. Before the delete operation completes, -// some Documents might still be returned by DocumentService.GetDocument or -// DocumentService.ListDocuments. To get a list of the Documents to be deleted, -// set PurgeDocumentsRequest.force to false. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + 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: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { + 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 *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { 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 *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) 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.googleclouddiscoveryenginev1betapurgedocumentsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresConversationsListCall) 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}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -30083,13 +34000,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.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 -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30108,7 +34025,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30121,68 +34038,94 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - 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 *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) 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) + } } -// 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`. +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -30193,13 +34136,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30218,7 +34161,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30231,7 +34174,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30245,8 +34188,8 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30254,7 +34197,7 @@ func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30262,27 +34205,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30303,13 +34246,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30341,7 +34284,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30354,28 +34297,28 @@ type ProjectsLocationsDataStoresBranchesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -30383,7 +34326,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30391,27 +34334,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30432,13 +34375,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30473,7 +34416,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -30491,79 +34434,85 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } -type ProjectsLocationsDataStoresCompletionSuggestionsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports CompletionSuggestions for a DataStore. +// 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. // -// - parent: The parent data store resource name for which to import customer -// autocomplete suggestions. Follows pattern -// `projects/*/locations/*/collections/*/dataStores/*`. -func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Import(parent string, googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaImportCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { - c := &ProjectsLocationsDataStoresCompletionSuggestionsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest = googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{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 *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsImportCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) 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.googleclouddiscoveryenginev1betaimportcompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresOperationsGetCall) 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}/completionSuggestions:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.completionSuggestions.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.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 *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30595,79 +34544,104 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all CompletionSuggestions for a DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name for which to purge completion -// suggestions. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresCompletionSuggestionsService) Purge(parent string, googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest *GoogleCloudDiscoveryengineV1betaPurgeCompletionSuggestionsRequest) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { - c := &ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest = googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + 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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) 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.googleclouddiscoveryenginev1betapurgecompletionsuggestionsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresOperationsListCall) 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}/completionSuggestions:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completionSuggestions.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.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 +// *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 *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30686,7 +34660,7 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30699,73 +34673,90 @@ func (c *ProjectsLocationsDataStoresCompletionSuggestionsPurgeCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataStoresControlsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl - 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 *ProjectsLocationsDataStoresOperationsListCall) 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) + } } -// Create: Creates a Control. By default 1000 controls are allowed for a data -// store. A request can be submitted to adjust this limit. If the Control to -// create already exists, an ALREADY_EXISTS error is returned. +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Schema. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsCreateCall { - c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema return c } -// ControlId sets the optional parameter "controlId": Required. The ID to use -// for the Control, which will become the final component of the Control's -// resource name. This value must be within 1-63 characters. Valid characters -// are /a-z-_/. -func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { - c.urlParams_.Set("controlId", controlId) +// SchemaId sets the optional parameter "schemaId": Required. The ID to use for +// the Schema, which becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) 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.googleclouddiscoveryenginev1betacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -30778,13 +34769,13 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.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 *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30803,7 +34794,7 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30816,7 +34807,7 @@ func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresControlsDeleteCall struct { +type ProjectsLocationsDataStoresSchemasDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30824,14 +34815,13 @@ type ProjectsLocationsDataStoresControlsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Control. If the Control to delete does not exist, a -// NOT_FOUND error is returned. +// Delete: Deletes a Schema. // -// - name: The resource name of the Control to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { - c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30839,27 +34829,27 @@ func (r *ProjectsLocationsDataStoresControlsService) Delete(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 *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -30877,13 +34867,13 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" 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 *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30902,7 +34892,7 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30915,7 +34905,7 @@ func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresControlsGetCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30924,13 +34914,13 @@ type ProjectsLocationsDataStoresControlsGetCall struct { header_ http.Header } -// Get: Gets a Control. +// Get: Gets a Schema. // -// - name: The resource name of the Control to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}/controls/{control_id}`. -func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { - c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30938,7 +34928,7 @@ func (r *ProjectsLocationsDataStoresControlsService) Get(name 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 *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30946,27 +34936,27 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) 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 *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30987,13 +34977,13 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31012,7 +35002,7 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31025,7 +35015,7 @@ func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataStoresControlsListCall struct { +type ProjectsLocationsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -31034,38 +35024,31 @@ type ProjectsLocationsDataStoresControlsListCall struct { header_ http.Header } -// List: Lists all Controls by their parent DataStore. +// List: Gets a list of Schemas. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/dataStores/{data_store_id}` or -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { - c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. Supported features: * List all the products under the parent branch -// if filter is unset. Currently this field is unsupported. -func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListControls` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -31073,7 +35056,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31081,27 +35064,27 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31109,7 +35092,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) 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, "v1beta/{+parent}/controls") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31122,13 +35105,13 @@ func (c *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31147,7 +35130,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31163,7 +35146,7 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallO // 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 *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -31181,63 +35164,63 @@ func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, } } -type ProjectsLocationsDataStoresControlsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Control. Control action type cannot be changed. If the -// Control to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Schema. // -// - name: Immutable. Fully qualified name -// `projects/*/locations/global/dataStore/*/controls/*`. -func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsPatchCall { - c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Control to update. The following are NOT supported: * -// Control.name * Control.solution_type If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) 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.googleclouddiscoveryenginev1betacontrol) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } @@ -31256,13 +35239,13 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.controls.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaControl.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 *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31281,7 +35264,7 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaControl{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31294,64 +35277,63 @@ func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Answer: Answer query method. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) 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.googleclouddiscoveryenginev1betaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31359,18 +35341,18 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31389,7 +35371,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31402,80 +35384,86 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{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 *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { 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 *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) 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.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) 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}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31494,7 +35482,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31507,74 +35495,101 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// List: Lists all ServingConfigs linked to this dataStore. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { + 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 *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { 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 *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" 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 *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31593,7 +35608,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31603,71 +35618,95 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + 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 *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) 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 ProjectsLocationsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { + 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 *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { 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 *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) 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 *ProjectsLocationsDataStoresServingConfigsPatchCall) 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.googleclouddiscoveryenginev1betaservingconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -31678,13 +35717,13 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31703,7 +35742,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31716,117 +35755,85 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataStoresConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - 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: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { 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 *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) 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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betarecommendrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") 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, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31845,7 +35852,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31858,111 +35865,83 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. 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 *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) 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 ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Search: Performs a search. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") 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{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31981,7 +35960,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31994,85 +35973,101 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.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.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } } -// 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. +type ProjectsLocationsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsCreateCall { + c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) 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 *ProjectsLocationsDataStoresSessionsCreateCall) 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.googleclouddiscoveryenginev1betasession) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32091,7 +36086,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32104,87 +36099,57 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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`. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { - 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { 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 *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -32195,13 +36160,13 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.delete" 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 *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32220,7 +36185,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32233,28 +36198,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea 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 *ProjectsLocationsDataStoresModelsOperationsListCall) 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 ProjectsLocationsDataStoresOperationsGetCall struct { +type ProjectsLocationsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32263,13 +36207,13 @@ type ProjectsLocationsDataStoresOperationsGetCall struct { 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. +// Get: Gets a Session. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { + c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32277,7 +36221,7 @@ func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32285,27 +36229,27 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) 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 *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32326,13 +36270,13 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32351,7 +36295,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32364,41 +36308,54 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresSessionsListCall 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 all Sessions by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { + c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { +// 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: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -32406,7 +36363,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32414,27 +36371,27 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32442,7 +36399,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32450,18 +36407,18 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* } 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 "discoveryengine.projects.locations.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32480,7 +36437,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32496,7 +36453,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal // 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 *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -32514,169 +36471,71 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Contex } } -type ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsPatchCall { + c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { + 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 *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) 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.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") - 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 "discoveryengine.projects.locations.dataStores.schemas.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 *ProjectsLocationsDataStoresSchemasCreateCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) 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 ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Schema. -// -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{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 *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) 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, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -32687,13 +36546,13 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.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 +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32712,7 +36571,7 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32725,7 +36584,7 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresSchemasGetCall struct { +type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32734,13 +36593,13 @@ type ProjectsLocationsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets a Answer. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32748,7 +36607,7 @@ func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32756,27 +36615,27 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) 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 *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -32797,13 +36656,13 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32822,7 +36681,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSchema{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32835,103 +36694,80 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { 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 *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") 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, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header -// 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 *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32950,7 +36786,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32963,109 +36799,80 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp 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 *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) 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 ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. // -// - name: Immutable. The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") 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{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch" 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 *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33097,63 +36904,59 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { +type ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall struct { s *Service - servingConfig string - googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + siteSearchEngine string + googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Answer: Answer query method. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1betaanswerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33161,18 +36964,18 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.recrawlUris" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header -// 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 *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33191,7 +36994,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33204,86 +37007,80 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// BatchCreate: Creates TargetSite in a batch. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource shared by all TargetSites being created. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { 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 *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.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 *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33302,7 +37099,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33315,84 +37112,62 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataStoresServingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// Create: Creates a TargetSite. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { - c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { 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 *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsListCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1betatargetsite) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -33403,13 +37178,13 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33428,7 +37203,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33441,92 +37216,59 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi 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 *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) 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 ProjectsLocationsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Delete: Deletes a TargetSite. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided ServingConfig to update. The following are NOT supported: * -// ServingConfig.name If not set, all supported fields are updated. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { - 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 *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) 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.googleclouddiscoveryenginev1betaservingconfig) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -33537,13 +37279,13 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.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 *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33562,7 +37304,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33575,85 +37317,88 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Get: Gets a TargetSite. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall{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 *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) 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.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) 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/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33672,7 +37417,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33685,83 +37430,106 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Gets a list of TargetSites. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to list TargetSites under this site search engine, regardless of whether +// or not this branch exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + 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. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListTargetSites` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListTargetSites` must match the call that provided the page token. +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { + 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 *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) 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.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) 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/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") 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{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.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 *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33780,7 +37548,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33796,9 +37564,9 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea // 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 *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -33810,84 +37578,84 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context. if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ProjectsLocationsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Patch: Updates a TargetSite. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsCreateCall { - c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) 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.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33906,7 +37674,7 @@ func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33919,74 +37687,79 @@ func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) 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.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") 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 "discoveryengine.projects.locations.dataStores.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.import" 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 *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34005,7 +37778,7 @@ func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34018,85 +37791,79 @@ func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataStoresSessionsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Session. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { - c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import denylist +// entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { 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 *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsGetCall) 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 *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) 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.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34115,7 +37882,7 @@ func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34128,7 +37895,7 @@ func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDataStoresSessionsListCall struct { +type ProjectsLocationsDataStoresUserEventsCollectCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -34137,53 +37904,48 @@ type ProjectsLocationsDataStoresSessionsListCall struct { header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { - c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { - 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: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34191,27 +37953,27 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) 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 *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -34219,7 +37981,7 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) 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, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -34232,13 +37994,13 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34257,7 +38019,7 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34270,109 +38032,83 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) 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 *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) 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 ProjectsLocationsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsPatchCall { - c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { + c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") 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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.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 *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34391,7 +38127,7 @@ func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34404,85 +38140,90 @@ func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Answer. +// Write: Writes a single user event. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent + return c +} + +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { 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 *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsDataStoresUserEventsWriteCall) 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.googleclouddiscoveryenginev1betauserevent) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.write" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34501,7 +38242,7 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswer{ + ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34514,61 +38255,60 @@ func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaevaluation *GoogleCloudDiscoveryengineV1betaEvaluation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +// Create: Creates a Evaluation. Upon creation, the evaluation will be +// automatically triggered and begin execution. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEvaluationsService) Create(parent string, googleclouddiscoveryenginev1betaevaluation *GoogleCloudDiscoveryengineV1betaEvaluation) *ProjectsLocationsEvaluationsCreateCall { + c := &ProjectsLocationsEvaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaevaluation = googleclouddiscoveryenginev1betaevaluation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsCreateCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEvaluationsCreateCall) 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.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaevaluation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/evaluations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34576,18 +38316,18 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34619,80 +38359,87 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCal return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +// Get: Gets a Evaluation. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest +// - name: Full resource name of Evaluation, such as +// `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the +// caller does not have permission to access the Evaluation, regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. If the +// requested Evaluation does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall { + c := &ProjectsLocationsEvaluationsGetCall{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 *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall { 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 *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsGetCall) 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/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 +// *GoogleCloudDiscoveryengineV1betaEvaluation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34711,7 +38458,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34724,78 +38471,106 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// List: Gets a list of Evaluations. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest +// - parent: The parent location resource name, such as +// `projects/{project}/locations/{location}`. If the caller does not have +// permission to list Evaluations under this location, regardless of whether +// or not this location exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall { + c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Evaluations to return. If unspecified, defaults to 100. The maximum allowed +// value is 1000. Values above 1000 will be coerced to 1000. If this field is +// negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListEvaluationsResponse.next_page_token, received from a previous +// EvaluationService.ListEvaluations call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// EvaluationService.ListEvaluations must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall { 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 *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) 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.googleclouddiscoveryenginev1betarecrawlurisrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsListCall) 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/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/evaluations") 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{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListEvaluationsResponse.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 *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEvaluationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34814,7 +38589,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListEvaluationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34824,83 +38599,131 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ... if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + 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 *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEvaluationsResponse) 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 ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEvaluationsListResultsCall struct { + s *Service + evaluation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// ListResults: Gets a list of results for a given a Evaluation. // -// - parent: The parent resource shared by all TargetSites being created. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest +// - evaluation: The evaluation resource name, such as +// `projects/{project}/locations/{location}/evaluations/{evaluation}`. If the +// caller does not have permission to list EvaluationResult under this +// evaluation, regardless of whether or not this evaluation set exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsEvaluationsService) ListResults(evaluation string) *ProjectsLocationsEvaluationsListResultsCall { + c := &ProjectsLocationsEvaluationsListResultsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.evaluation = evaluation + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// EvaluationResult to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If this +// field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListResultsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListEvaluationResultsResponse.next_page_token, received from a previous +// EvaluationService.ListEvaluationResults call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// EvaluationService.ListEvaluationResults must match the call that provided +// the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListResultsCall { + 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsEvaluationsListResultsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListResultsCall { 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 *ProjectsLocationsEvaluationsListResultsCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListResultsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsEvaluationsListResultsCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListResultsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsListResultsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsListResultsCall) 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}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+evaluation}:listResults") 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, + "evaluation": c.evaluation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.evaluations.listResults" 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsListResultsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34919,7 +38742,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34932,79 +38755,106 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - 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 *ProjectsLocationsEvaluationsListResultsCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEvaluationResultsResponse) 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) + } } -// Create: Creates a TargetSite. +type ProjectsLocationsEvaluationsOperationsGetCall 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. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite +// - name: The name of the operation resource. +func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { + c := &ProjectsLocationsEvaluationsOperationsGetCall{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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { 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 *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) 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.googleclouddiscoveryenginev1betatargetsite) - if err != nil { - return nil, err +func (c *ProjectsLocationsEvaluationsOperationsGetCall) 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}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.evaluations.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35036,76 +38886,80 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(op return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsGroundingConfigsCheckCall struct { + s *Service + groundingConfig string + googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetSite. +// Check: Performs a grounding check. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - groundingConfig: The resource name of the grounding config, such as +// `projects/*/locations/global/groundingConfigs/default_grounding_config`. +func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { + c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groundingConfig = groundingConfig + c.googleclouddiscoveryenginev1betacheckgroundingrequest = googleclouddiscoveryenginev1betacheckgroundingrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsGroundingConfigsCheckCall) 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.googleclouddiscoveryenginev1betacheckgroundingrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+groundingConfig}:check") 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, + "groundingConfig": c.groundingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" 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 +// *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCheckGroundingResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35124,7 +38978,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaCheckGroundingResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35137,7 +38991,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(op return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -35146,16 +39000,13 @@ type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall struct { header_ http.Header } -// Get: Gets a TargetSite. +// 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: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -35163,7 +39014,7 @@ func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35171,27 +39022,27 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) 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_) @@ -35212,13 +39063,13 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.get" call. +// Do executes the "discoveryengine.projects.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaTargetSite.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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { +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 { @@ -35237,7 +39088,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35250,43 +39101,41 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to list TargetSites under this site search engine, regardless of whether -// or not this branch exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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 } -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, server will pick an -// appropriate default. The maximum value is 1000; values above 1000 will be -// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is -// returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +// 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": A page token, received -// from a previous `ListTargetSites` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListTargetSites` must match the call that provided the page token. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +// 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 } @@ -35294,7 +39143,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) PageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35302,27 +39151,27 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Fields( // 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall { +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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +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_) @@ -35330,7 +39179,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doReque var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35338,18 +39187,18 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) doReque } 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 "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.list" call. +// Do executes the "discoveryengine.projects.locations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.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 +// *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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { +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 { @@ -35368,7 +39217,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35384,7 +39233,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts // 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 *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { +func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -35402,80 +39251,79 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesListCall) Pages(c } } -type ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRankingConfigsRankCall struct { + s *Service + rankingConfig string + googleclouddiscoveryenginev1betarankrequest *GoogleCloudDiscoveryengineV1betaRankRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Rank: Ranks a list of text records based on the given input query. // -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite +// - rankingConfig: The resource name of the rank service config, such as +// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank +// ing_config`. +func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1betarankrequest *GoogleCloudDiscoveryengineV1betaRankRequest) *ProjectsLocationsRankingConfigsRankCall { + c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.rankingConfig = rankingConfig + c.googleclouddiscoveryenginev1betarankrequest = googleclouddiscoveryenginev1betarankrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsRankingConfigsRankCall) Fields(s ...googleapi.Field) *ProjectsLocationsRankingConfigsRankCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsRankingConfigsRankCall) Context(ctx context.Context) *ProjectsLocationsRankingConfigsRankCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsRankingConfigsRankCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRankingConfigsRankCall) 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.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarankrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+rankingConfig}:rank") 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{ - "name": c.name, + "rankingConfig": c.rankingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.rankingConfigs.rank" 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 +// *GoogleCloudDiscoveryengineV1betaRankResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRankResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35494,7 +39342,7 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaRankResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35507,60 +39355,73 @@ func (c *ProjectsLocationsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opt return ret, nil } -type ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasamplequeryset *GoogleCloudDiscoveryengineV1betaSampleQuerySet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Create: Creates a SampleQuerySet // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsSampleQuerySetsService) Create(parent string, googleclouddiscoveryenginev1betasamplequeryset *GoogleCloudDiscoveryengineV1betaSampleQuerySet) *ProjectsLocationsSampleQuerySetsCreateCall { + c := &ProjectsLocationsSampleQuerySetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1betasamplequeryset = googleclouddiscoveryenginev1betasamplequeryset + return c +} + +// SampleQuerySetId sets the optional parameter "sampleQuerySetId": Required. +// The ID to use for the SampleQuerySet, which will become the final component +// of the SampleQuerySet.name. If the caller does not have permission to create +// the SampleQuerySet, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique among all +// SampleQuerySets with the same parent. Otherwise, an `ALREADY_EXISTS` error +// is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsCreateCall) SampleQuerySetId(sampleQuerySetId string) *ProjectsLocationsSampleQuerySetsCreateCall { + c.urlParams_.Set("sampleQuerySetId", sampleQuerySetId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) 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.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasamplequeryset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sampleQuerySets") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -35573,13 +39434,13 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 +// *GoogleCloudDiscoveryengineV1betaSampleQuerySet.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35598,7 +39459,7 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35611,79 +39472,76 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesImportCall) Do(opts return ret, nil } -type ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +// Delete: Deletes a SampleQuerySet. // -// - parent: The parent data store resource name for which to import denylist -// entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest +// - name: Full resource name of SampleQuerySet, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to delete the SampleQuerySet, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error is +// returned. If the SampleQuerySet to delete does not exist, a `NOT_FOUND` +// error is returned. +func (r *ProjectsLocationsSampleQuerySetsService) Delete(name string) *ProjectsLocationsSampleQuerySetsDeleteCall { + c := &ProjectsLocationsSampleQuerySetsDeleteCall{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 *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsSampleQuerySetsDeleteCall) 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.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } 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 "discoveryengine.projects.locations.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsSampleQuerySetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35702,70 +39560,46 @@ func (c *ProjectsLocationsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + 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 ProjectsLocationsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party domain. -// This method is used only by the Discovery Engine API JavaScript pixel and -// Google Tag Manager. Users should not call this method directly. -// -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +type ProjectsLocationsSampleQuerySetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a SampleQuerySet. +// +// - name: Full resource name of SampleQuerySet, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to access the SampleQuerySet, +// regardless of whether or not it exists, a PERMISSION_DENIED error is +// returned. If the requested SampleQuerySet does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsSampleQuerySetsService) Get(name string) *ProjectsLocationsSampleQuerySetsGetCall { + c := &ProjectsLocationsSampleQuerySetsGetCall{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 *ProjectsLocationsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35773,27 +39607,27 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsSampleQuerySetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -35801,7 +39635,7 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35809,18 +39643,18 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) 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 "discoveryengine.projects.locations.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *GoogleCloudDiscoveryengineV1betaSampleQuerySet.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsSampleQuerySetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35839,7 +39673,7 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35852,66 +39686,90 @@ func (c *ProjectsLocationsDataStoresUserEventsCollectCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of user events. Request processing might be synchronous. -// Events that already exist are skipped. Use this method for backfilling -// historical user events. Operation.response is of type ImportResponse. Note -// that it is possible for a subset of the items to be successfully inserted. -// Operation.metadata is of type ImportMetadata. +// List: Gets a list of SampleQuerySets. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsDataStoresUserEventsImportCall { - c := &ProjectsLocationsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent location resource name, such as +// `projects/{project}/locations/{location}`. If the caller does not have +// permission to list SampleQuerySets under this location, regardless of +// whether or not this location exists, a `PERMISSION_DENIED` error is +// returned. +func (r *ProjectsLocationsSampleQuerySetsService) List(parent string) *ProjectsLocationsSampleQuerySetsListCall { + c := &ProjectsLocationsSampleQuerySetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SampleQuerySets to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If this +// field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsListCall) PageSize(pageSize int64) *ProjectsLocationsSampleQuerySetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListSampleQuerySetsResponse.next_page_token, received from a previous +// SampleQuerySetService.ListSampleQuerySets call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SampleQuerySetService.ListSampleQuerySets must match the call that provided +// the page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsListCall) PageToken(pageToken string) *ProjectsLocationsSampleQuerySetsListCall { + 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 *ProjectsLocationsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsSampleQuerySetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsListCall { 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 *ProjectsLocationsSampleQuerySetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsSampleQuerySetsListCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsImportCall) 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.googleclouddiscoveryenginev1betaimportusereventsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsSampleQuerySetsListCall) 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}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sampleQuerySets") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -35922,13 +39780,13 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse.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 *ProjectsLocationsSampleQuerySetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35947,7 +39805,7 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35960,90 +39818,110 @@ func (c *ProjectsLocationsDataStoresUserEventsImportCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent - 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 *ProjectsLocationsSampleQuerySetsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSampleQuerySetsResponse) 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) + } } -// Write: Writes a single user event. +type ProjectsLocationsSampleQuerySetsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasamplequeryset *GoogleCloudDiscoveryengineV1betaSampleQuerySet + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a SampleQuerySet. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent +// - name: Immutable. The full resource name of the SampleQuerySet, in the +// format of +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// This field must be a UTF-8 encoded string with a length limit of 1024 +// characters. +func (r *ProjectsLocationsSampleQuerySetsService) Patch(name string, googleclouddiscoveryenginev1betasamplequeryset *GoogleCloudDiscoveryengineV1betaSampleQuerySet) *ProjectsLocationsSampleQuerySetsPatchCall { + c := &ProjectsLocationsSampleQuerySetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betasamplequeryset = googleclouddiscoveryenginev1betasamplequeryset return c } -// WriteAsync sets the optional parameter "writeAsync": If set to true, the -// user event is written asynchronously after validation, and the API responds -// without waiting for the write. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { - c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'sample query set' to update. If not set, will by +// default update all fields. +func (c *ProjectsLocationsSampleQuerySetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSampleQuerySetsPatchCall { + 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 *ProjectsLocationsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) 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.googleclouddiscoveryenginev1betauserevent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasamplequeryset) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.dataStores.userEvents.write" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaSampleQuerySet.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { +func (c *ProjectsLocationsSampleQuerySetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuerySet, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36062,7 +39940,7 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuerySet{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36075,7 +39953,7 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEvaluationsOperationsGetCall struct { +type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36089,8 +39967,8 @@ type ProjectsLocationsEvaluationsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { - c := &ProjectsLocationsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsSampleQuerySetsOperationsService) Get(name string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { + c := &ProjectsLocationsSampleQuerySetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36098,7 +39976,7 @@ func (r *ProjectsLocationsEvaluationsOperationsService) 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 *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36106,27 +39984,27 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Fi // 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 *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -36147,13 +40025,13 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.evaluations.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.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 *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36185,59 +40063,73 @@ func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsGroundingConfigsCheckCall struct { - s *Service - groundingConfig string - googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasamplequery *GoogleCloudDiscoveryengineV1betaSampleQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Check: Performs a grounding check. +// Create: Creates a SampleQuery // -// - groundingConfig: The resource name of the grounding config, such as -// `projects/*/locations/global/groundingConfigs/default_grounding_config`. -func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { - c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.groundingConfig = groundingConfig - c.googleclouddiscoveryenginev1betacheckgroundingrequest = googleclouddiscoveryenginev1betacheckgroundingrequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Create(parent string, googleclouddiscoveryenginev1betasamplequery *GoogleCloudDiscoveryengineV1betaSampleQuery) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betasamplequery = googleclouddiscoveryenginev1betasamplequery + return c +} + +// SampleQueryId sets the optional parameter "sampleQueryId": Required. The ID +// to use for the SampleQuery, which will become the final component of the +// SampleQuery.name. If the caller does not have permission to create the +// SampleQuery, regardless of whether or not it exists, a `PERMISSION_DENIED` +// error is returned. This field must be unique among all SampleQuerys with the +// same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field +// must conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with +// a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) SampleQueryId(sampleQueryId string) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { + c.urlParams_.Set("sampleQueryId", sampleQueryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) 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.googleclouddiscoveryenginev1betacheckgroundingrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasamplequery) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+groundingConfig}:check") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sampleQueries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36245,20 +40137,18 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*htt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "groundingConfig": c.groundingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaSampleQuery.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCheckGroundingResponse, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36277,7 +40167,7 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCheckGroundingResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36290,22 +40180,24 @@ func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + 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. +// Delete: Deletes a SampleQuery. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of SampleQuery, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. If the caller does not have permission to +// delete the SampleQuery, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. If the SampleQuery to delete does +// not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Delete(name string) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36313,45 +40205,34 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // 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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { 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 { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall { c.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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) 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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) 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/{+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 } @@ -36362,13 +40243,13 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsSampleQuerySetsSampleQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36387,7 +40268,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36400,7 +40281,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsSampleQuerySetsSampleQueriesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -36409,40 +40290,24 @@ type ProjectsLocationsOperationsListCall struct { 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`. +// Get: Gets a SampleQuery. // -// - 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)} +// - name: Full resource name of SampleQuery, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. If the caller does not have permission to +// access the SampleQuery, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the requested SampleQuery does not +// exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Get(name string) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesGetCall{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 { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36450,27 +40315,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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { 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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall { c.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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) 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 *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -36478,7 +40343,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, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36491,13 +40356,13 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.operations.list" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaSampleQuery.ServerResponse.Header or (if a // response was returned 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) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36516,7 +40381,7 @@ func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36529,81 +40394,64 @@ func (c *ProjectsLocationsOperationsListCall) 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 *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) - } -} - -type ProjectsLocationsRankingConfigsRankCall struct { - s *Service - rankingConfig string - googleclouddiscoveryenginev1betarankrequest *GoogleCloudDiscoveryengineV1betaRankRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsSampleQuerySetsSampleQueriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportsamplequeriesrequest *GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Rank: Ranks a list of text records based on the given input query. +// Import: Bulk import of multiple SampleQuerys. Sample queries that already +// exist may be deleted. Note: It is possible for a subset of the SampleQuerys +// to be successfully imported. // -// - rankingConfig: The resource name of the rank service config, such as -// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_rank -// ing_config`. -func (r *ProjectsLocationsRankingConfigsService) Rank(rankingConfig string, googleclouddiscoveryenginev1betarankrequest *GoogleCloudDiscoveryengineV1betaRankRequest) *ProjectsLocationsRankingConfigsRankCall { - c := &ProjectsLocationsRankingConfigsRankCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.rankingConfig = rankingConfig - c.googleclouddiscoveryenginev1betarankrequest = googleclouddiscoveryenginev1betarankrequest +// - parent: The parent sample query set resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to list SampleQuerys under this +// sample query set, regardless of whether or not this sample query set +// exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsamplequeriesrequest *GoogleCloudDiscoveryengineV1betaImportSampleQueriesRequest) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportsamplequeriesrequest = googleclouddiscoveryenginev1betaimportsamplequeriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRankingConfigsRankCall) Fields(s ...googleapi.Field) *ProjectsLocationsRankingConfigsRankCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRankingConfigsRankCall) Context(ctx context.Context) *ProjectsLocationsRankingConfigsRankCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRankingConfigsRankCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRankingConfigsRankCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) 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.googleclouddiscoveryenginev1betarankrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsamplequeriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+rankingConfig}:rank") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sampleQueries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36611,18 +40459,18 @@ func (c *ProjectsLocationsRankingConfigsRankCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "rankingConfig": c.rankingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.rankingConfigs.rank" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRankResponse.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 *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRankResponse, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36641,7 +40489,7 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRankResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36654,30 +40502,52 @@ func (c *ProjectsLocationsRankingConfigsRankCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsSampleQuerySetsOperationsGetCall struct { +type ProjectsLocationsSampleQuerySetsSampleQueriesListCall struct { s *Service - name string + parent 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. +// List: Gets a list of SampleQuerys. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsSampleQuerySetsOperationsService) Get(name string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { - c := &ProjectsLocationsSampleQuerySetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent sample query set resource name, such as +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}`. +// If the caller does not have permission to list SampleQuerys under this +// sample query set, regardless of whether or not this sample query set +// exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) List(parent string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// SampleQuerys to return. If unspecified, defaults to 100. The maximum allowed +// value is 1000. Values above 1000 will be coerced to 1000. If this field is +// negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListSampleQueriesResponse.next_page_token, received from a previous +// SampleQueryService.ListSampleQueries call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SampleQueryService.ListSampleQueries must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) PageToken(pageToken string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { + 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 *ProjectsLocationsSampleQuerySetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36685,27 +40555,27 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) 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 *ProjectsLocationsSampleQuerySetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsOperationsGetCall { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -36713,26 +40583,161 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sampleQueries") 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.sampleQuerySets.sampleQueries.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse, 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 := &GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse{ + 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 *ProjectsLocationsSampleQuerySetsSampleQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSampleQueriesResponse) 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 ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasamplequery *GoogleCloudDiscoveryengineV1betaSampleQuery + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a SampleQuery. +// +// - name: Immutable. The full resource name of the sample query, in the format +// of +// `projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}/s +// ampleQueries/{sampleQuery}`. This field must be a UTF-8 encoded string +// with a length limit of 1024 characters. +func (r *ProjectsLocationsSampleQuerySetsSampleQueriesService) Patch(name string, googleclouddiscoveryenginev1betasamplequery *GoogleCloudDiscoveryengineV1betaSampleQuery) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + c := &ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betasamplequery = googleclouddiscoveryenginev1betasamplequery + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'simple query' to update. If not set, will by +// default update all fields. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + 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 *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Context(ctx context.Context) *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) 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.googleclouddiscoveryenginev1betasamplequery) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "discoveryengine.projects.locations.sampleQuerySets.operations.get" call. +// Do executes the "discoveryengine.projects.locations.sampleQuerySets.sampleQueries.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 +// *GoogleCloudDiscoveryengineV1betaSampleQuery.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsSampleQuerySetsSampleQueriesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSampleQuery, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36751,7 +40756,7 @@ func (c *ProjectsLocationsSampleQuerySetsOperationsGetCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSampleQuery{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index 340126b84e8..49f74318f5f 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -9222,7 +9222,7 @@ } } }, - "revision": "20240627", + "revision": "20240717", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -16719,7 +16719,7 @@ "type": "array" }, "adGroupQaIds": { - "description": "Optional. YouTube Ad Groups QA to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.", + "description": "Optional. YouTube Ad Groups, by ID, to download in QA format. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.", "items": { "format": "int64", "type": "string" @@ -16751,7 +16751,7 @@ "type": "array" }, "lineItemQaIds": { - "description": "Optional. Line Items QA to download by ID. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.", + "description": "Optional. Line Items, by ID, to download in QA format. All IDs must belong to the same Advertiser or Partner specified in CreateSdfDownloadTaskRequest.", "items": { "format": "int64", "type": "string" @@ -19624,8 +19624,8 @@ "Line Item.", "YouTube Ad Group.", "YouTube Ad.", - "Line Item QA.", - "YouTube Ad Group QA." + "Line Item - QA format.", + "YouTube Ad Group - QA format." ], "type": "string" }, @@ -19656,8 +19656,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" } @@ -20529,7 +20529,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/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index a3546f20c59..22b43a5ad0f 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -9211,8 +9211,8 @@ type IdFilter struct { // AdGroupIds: YouTube Ad Groups to download by ID. All IDs must belong to the // same Advertiser or Partner specified in CreateSdfDownloadTaskRequest. AdGroupIds googleapi.Int64s `json:"adGroupIds,omitempty"` - // AdGroupQaIds: Optional. YouTube Ad Groups QA to download by ID. All IDs must - // belong to the same Advertiser or Partner specified in + // AdGroupQaIds: Optional. YouTube Ad Groups, by ID, to download in QA format. + // All IDs must belong to the same Advertiser or Partner specified in // CreateSdfDownloadTaskRequest. AdGroupQaIds googleapi.Int64s `json:"adGroupQaIds,omitempty"` // CampaignIds: Campaigns to download by ID. All IDs must belong to the same @@ -9224,8 +9224,8 @@ type IdFilter struct { // LineItemIds: Line Items to download by ID. All IDs must belong to the same // Advertiser or Partner specified in CreateSdfDownloadTaskRequest. LineItemIds googleapi.Int64s `json:"lineItemIds,omitempty"` - // LineItemQaIds: Optional. Line Items QA to download by ID. All IDs must - // belong to the same Advertiser or Partner specified in + // LineItemQaIds: Optional. Line Items, by ID, to download in QA format. All + // IDs must belong to the same Advertiser or Partner specified in // CreateSdfDownloadTaskRequest. LineItemQaIds googleapi.Int64s `json:"lineItemQaIds,omitempty"` // MediaProductIds: Media Products to download by ID. All IDs must belong to @@ -12751,8 +12751,8 @@ type ParentEntityFilter struct { // "FILE_TYPE_LINE_ITEM" - Line Item. // "FILE_TYPE_AD_GROUP" - YouTube Ad Group. // "FILE_TYPE_AD" - YouTube Ad. - // "FILE_TYPE_LINE_ITEM_QA" - Line Item QA. - // "FILE_TYPE_AD_GROUP_QA" - YouTube Ad Group QA. + // "FILE_TYPE_LINE_ITEM_QA" - Line Item - QA format. + // "FILE_TYPE_AD_GROUP_QA" - YouTube Ad Group - QA format. FileType []string `json:"fileType,omitempty"` // FilterIds: The IDs of the specified filter type. This is used to filter // entities to fetch. If filter type is not `FILTER_TYPE_NONE`, at least one ID @@ -12780,11 +12780,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 @@ -13941,10 +13943,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/docs/v1/docs-api.json b/docs/v1/docs-api.json index 221324979d8..1f4225c4378 100644 --- a/docs/v1/docs-api.json +++ b/docs/v1/docs-api.json @@ -183,6 +183,11 @@ "required": true, "type": "string" }, + "includeTabsContent": { + "description": "Whether to populate the Document.tabs field instead of the text content fields like body and documentStyle on Document. - When `True`: Document content populates in the Document.tabs field instead of the text content fields in Document. - When `False`: The content of the document's first tab populates the content fields in Document excluding Document.tabs. If a document has only one tab, then that tab is used to populate the document content. Document.tabs will be empty.", + "location": "query", + "type": "boolean" + }, "suggestionsViewMode": { "description": "The suggestions view mode to apply to the document. This allows viewing the document with all suggestions inline, accepted or rejected. If one is not specified, DEFAULT_FOR_CURRENT_ACCESS is used.", "enum": [ @@ -216,7 +221,7 @@ } } }, - "revision": "20230929", + "revision": "20240722", "rootUrl": "https://docs.googleapis.com/", "schemas": { "AutoText": { @@ -341,6 +346,21 @@ }, "type": "object" }, + "BookmarkLink": { + "description": "A reference to a bookmark in this document.", + "id": "BookmarkLink", + "properties": { + "id": { + "description": "The ID of a bookmark in this document.", + "type": "string" + }, + "tabId": { + "description": "The ID of the tab containing this bookmark.", + "type": "string" + } + }, + "type": "object" + }, "Bullet": { "description": "Describes the bullet of a paragraph.", "id": "Bullet", @@ -671,6 +691,10 @@ "footerId": { "description": "The id of the footer to delete. If this footer is defined on DocumentStyle, the reference to this footer is removed, resulting in no footer of that type for the first section of the document. If this footer is defined on a SectionStyle, the reference to this footer is removed and the footer of that type is now continued from the previous section.", "type": "string" + }, + "tabId": { + "description": "The tab that contains the footer to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -682,6 +706,10 @@ "headerId": { "description": "The id of the header to delete. If this header is defined on DocumentStyle, the reference to this header is removed, resulting in no header of that type for the first section of the document. If this header is defined on a SectionStyle, the reference to this header is removed and the header of that type is now continued from the previous section.", "type": "string" + }, + "tabId": { + "description": "The tab containing the header to delete. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -697,6 +725,10 @@ "namedRangeId": { "description": "The ID of the named range to delete.", "type": "string" + }, + "tabsCriteria": { + "$ref": "TabsCriteria", + "description": "Optional. The criteria used to specify which tab(s) the range deletion should occur in. When omitted, the range deletion is applied to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the range deletion applies to the singular tab. In a document containing multiple tabs: - If provided, the range deletion applies to the specified tabs. - If not provided, the range deletion applies to all tabs." } }, "type": "object" @@ -719,6 +751,10 @@ "objectId": { "description": "The ID of the positioned object to delete.", "type": "string" + }, + "tabId": { + "description": "The tab that the positioned object to delete is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -872,6 +908,13 @@ ], "type": "string" }, + "tabs": { + "description": "Tabs that are part of a document. Tabs can contain child tabs, a tab nested within another tab. Child tabs are represented by the Tab.child_tabs field.", + "items": { + "$ref": "Tab" + }, + "type": "array" + }, "title": { "description": "The title of the document.", "type": "string" @@ -1046,6 +1089,88 @@ }, "type": "object" }, + "DocumentTab": { + "description": "A tab with document contents.", + "id": "DocumentTab", + "properties": { + "body": { + "$ref": "Body", + "description": "The main body of the document tab." + }, + "documentStyle": { + "$ref": "DocumentStyle", + "description": "The style of the document tab." + }, + "footers": { + "additionalProperties": { + "$ref": "Footer" + }, + "description": "The footers in the document tab, keyed by footer ID.", + "type": "object" + }, + "footnotes": { + "additionalProperties": { + "$ref": "Footnote" + }, + "description": "The footnotes in the document tab, keyed by footnote ID.", + "type": "object" + }, + "headers": { + "additionalProperties": { + "$ref": "Header" + }, + "description": "The headers in the document tab, keyed by header ID.", + "type": "object" + }, + "inlineObjects": { + "additionalProperties": { + "$ref": "InlineObject" + }, + "description": "The inline objects in the document tab, keyed by object ID.", + "type": "object" + }, + "lists": { + "additionalProperties": { + "$ref": "List" + }, + "description": "The lists in the document tab, keyed by list ID.", + "type": "object" + }, + "namedRanges": { + "additionalProperties": { + "$ref": "NamedRanges" + }, + "description": "The named ranges in the document tab, keyed by name.", + "type": "object" + }, + "namedStyles": { + "$ref": "NamedStyles", + "description": "The named styles of the document tab." + }, + "positionedObjects": { + "additionalProperties": { + "$ref": "PositionedObject" + }, + "description": "The positioned objects in the document tab, keyed by object ID.", + "type": "object" + }, + "suggestedDocumentStyleChanges": { + "additionalProperties": { + "$ref": "SuggestedDocumentStyle" + }, + "description": "The suggested changes to the style of the document tab, keyed by suggestion ID.", + "type": "object" + }, + "suggestedNamedStylesChanges": { + "additionalProperties": { + "$ref": "SuggestedNamedStyles" + }, + "description": "The suggested changes to the named styles of the document tab, keyed by suggestion ID.", + "type": "object" + } + }, + "type": "object" + }, "EmbeddedDrawingProperties": { "description": "The properties of an embedded drawing and used to differentiate the object type. An embedded drawing is one that's created and edited within a document. Note that extensive details are not supported.", "id": "EmbeddedDrawingProperties", @@ -1233,6 +1358,10 @@ "segmentId": { "description": "The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.", "type": "string" + }, + "tabId": { + "description": "The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -1352,6 +1481,21 @@ }, "type": "object" }, + "HeadingLink": { + "description": "A reference to a heading in this document.", + "id": "HeadingLink", + "properties": { + "id": { + "description": "The ID of a heading in this document.", + "type": "string" + }, + "tabId": { + "description": "The ID of the tab containing this heading.", + "type": "string" + } + }, + "type": "object" + }, "HorizontalRule": { "description": "A ParagraphElement representing a horizontal line.", "id": "HorizontalRule", @@ -1716,14 +1860,26 @@ "description": "A reference to another portion of a document or an external URL resource.", "id": "Link", "properties": { + "bookmark": { + "$ref": "BookmarkLink", + "description": "A bookmark in this document. In documents containing a single tab, links to bookmarks within the singular tab continue to return Link.bookmark_id when the includeTabsContent parameter is set to `false` or unset. Otherwise, this field is returned." + }, "bookmarkId": { "description": "The ID of a bookmark in this document.", "type": "string" }, + "heading": { + "$ref": "HeadingLink", + "description": "A heading in this document. In documents containing a single tab, links to headings within the singular tab continue to return Link.heading_id when the includeTabsContent parameter is set to `false` or unset. Otherwise, this field is returned." + }, "headingId": { "description": "The ID of a heading in this document.", "type": "string" }, + "tabId": { + "description": "The ID of a tab in this document.", + "type": "string" + }, "url": { "description": "An external URL.", "type": "string" @@ -1822,6 +1978,10 @@ "segmentId": { "description": "The ID of the header, footer or footnote the location is in. An empty segment ID signifies the document's body.", "type": "string" + }, + "tabId": { + "description": "The tab that the location is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -2760,6 +2920,10 @@ "description": "The zero-based start index of this range, in UTF-16 code units. In all current uses, a start index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges.", "format": "int32", "type": "integer" + }, + "tabId": { + "description": "The tab that contains this range. When omitted, the request applies to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" @@ -2775,6 +2939,10 @@ "replaceText": { "description": "The text that will replace the matched text.", "type": "string" + }, + "tabsCriteria": { + "$ref": "TabsCriteria", + "description": "Optional. The criteria used to specify in which tabs the replacement occurs. When omitted, the replacement applies to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the replacement applies to the singular tab. In a document containing multiple tabs: - If provided, the replacement applies to the specified tabs. - If omitted, the replacement applies to all tabs." } }, "type": "object" @@ -2811,6 +2979,10 @@ ], "type": "string" }, + "tabId": { + "description": "The tab that the image to be replaced is in. When omitted, the request is applied to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document.", + "type": "string" + }, "uri": { "description": "The URI of the new image. The image is fetched once at insertion time and a copy is stored for display inside the document. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URI can't surpass 2 KB in length. The URI is saved with the image, and exposed through the ImageProperties.source_uri field.", "type": "string" @@ -2830,6 +3002,10 @@ "description": "The name of the NamedRanges whose content will be replaced. If there are multiple named ranges with the given name, then the content of each one will be replaced. If there are no named ranges with the given name, then the request will be a no-op.", "type": "string" }, + "tabsCriteria": { + "$ref": "TabsCriteria", + "description": "Optional. The criteria used to specify in which tabs the replacement occurs. When omitted, the replacement applies to all tabs. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the replacement applies to the singular tab. In a document containing multiple tabs: - If provided, the replacement applies to the specified tabs. - If omitted, the replacement applies to all tabs." + }, "text": { "description": "Replaces the content of the specified named range(s) with the given text.", "type": "string" @@ -3535,6 +3711,57 @@ }, "type": "object" }, + "Tab": { + "description": "A tab in a document.", + "id": "Tab", + "properties": { + "childTabs": { + "description": "The child tabs nested within this tab.", + "items": { + "$ref": "Tab" + }, + "type": "array" + }, + "documentTab": { + "$ref": "DocumentTab", + "description": "A tab with document contents, like text and images." + }, + "tabProperties": { + "$ref": "TabProperties", + "description": "The properties of the tab, like ID and title." + } + }, + "type": "object" + }, + "TabProperties": { + "description": "Properties of a tab.", + "id": "TabProperties", + "properties": { + "index": { + "description": "The index of the tab within the parent.", + "format": "int32", + "type": "integer" + }, + "nestingLevel": { + "description": "Output only. The depth of the tab within the document. Root-level tabs start at 0.", + "format": "int32", + "type": "integer" + }, + "parentTabId": { + "description": "Optional. The ID of the parent tab. Empty when the current tab is a root-level tab, which means it doesn't have any parents.", + "type": "string" + }, + "tabId": { + "description": "Output only. The ID of the tab. This field can't be changed.", + "type": "string" + }, + "title": { + "description": "The user-visible name of the tab.", + "type": "string" + } + }, + "type": "object" + }, "TabStop": { "description": "A tab stop within a paragraph.", "id": "TabStop", @@ -3998,6 +4225,20 @@ }, "type": "object" }, + "TabsCriteria": { + "description": "A criteria that specifies in which tabs a request executes.", + "id": "TabsCriteria", + "properties": { + "tabIds": { + "description": "The list of tab IDs in which the request executes.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "TextRun": { "description": "A ParagraphElement that represents a run of text that all has the same styling.", "id": "TextRun", @@ -4171,6 +4412,10 @@ "description": "The fields that should be updated. At least one field must be specified. The root `document_style` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the background, set `fields` to `\"background\"`.", "format": "google-fieldmask", "type": "string" + }, + "tabId": { + "description": "The tab that contains the style to update. When omitted, the request applies to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If not provided, the request applies to the first tab in the document.", + "type": "string" } }, "type": "object" diff --git a/docs/v1/docs-gen.go b/docs/v1/docs-gen.go index d59ec717011..a2f42a32e4b 100644 --- a/docs/v1/docs-gen.go +++ b/docs/v1/docs-gen.go @@ -353,6 +353,30 @@ func (s Body) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BookmarkLink: A reference to a bookmark in this document. +type BookmarkLink struct { + // Id: The ID of a bookmark in this document. + Id string `json:"id,omitempty"` + // TabId: The ID of the tab containing this bookmark. + TabId string `json:"tabId,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 BookmarkLink) MarshalJSON() ([]byte, error) { + type NoMethod BookmarkLink + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Bullet: Describes the bullet of a paragraph. type Bullet struct { // ListId: The ID of the list this paragraph belongs to. @@ -899,6 +923,13 @@ type DeleteFooterRequest struct { // defined on a SectionStyle, the reference to this footer is removed and the // footer of that type is now continued from the previous section. FooterId string `json:"footerId,omitempty"` + // TabId: The tab that contains the footer to delete. When omitted, the request + // is applied to the first tab. In a document containing a single tab: - If + // provided, must match the singular tab's ID. - If omitted, the request + // applies to the singular tab. In a document containing multiple tabs: - If + // provided, the request applies to the specified tab. - If omitted, the + // request applies to the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "FooterId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -925,6 +956,13 @@ type DeleteHeaderRequest struct { // defined on a SectionStyle, the reference to this header is removed and the // header of that type is now continued from the previous section. HeaderId string `json:"headerId,omitempty"` + // TabId: The tab containing the header to delete. When omitted, the request is + // applied to the first tab. In a document containing a single tab: - If + // provided, must match the singular tab's ID. - If omitted, the request + // applies to the singular tab. In a document containing multiple tabs: - If + // provided, the request applies to the specified tab. - If omitted, the + // request applies to the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "HeaderId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -950,6 +988,14 @@ type DeleteNamedRangeRequest struct { Name string `json:"name,omitempty"` // NamedRangeId: The ID of the named range to delete. NamedRangeId string `json:"namedRangeId,omitempty"` + // TabsCriteria: Optional. The criteria used to specify which tab(s) the range + // deletion should occur in. When omitted, the range deletion is applied to all + // tabs. In a document containing a single tab: - If provided, must match the + // singular tab's ID. - If omitted, the range deletion applies to the singular + // tab. In a document containing multiple tabs: - If provided, the range + // deletion applies to the specified tabs. - If not provided, the range + // deletion applies to all tabs. + TabsCriteria *TabsCriteria `json:"tabsCriteria,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 @@ -997,6 +1043,13 @@ func (s DeleteParagraphBulletsRequest) MarshalJSON() ([]byte, error) { type DeletePositionedObjectRequest struct { // ObjectId: The ID of the positioned object to delete. ObjectId string `json:"objectId,omitempty"` + // TabId: The tab that the positioned object to delete is in. When omitted, the + // request is applied to the first tab. In a document containing a single tab: + // - If provided, must match the singular tab's ID. - If omitted, the request + // applies to the singular tab. In a document containing multiple tabs: - If + // provided, the request applies to the specified tab. - If omitted, the + // request applies to the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "ObjectId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1173,6 +1226,10 @@ type Document struct { // "PREVIEW_WITHOUT_SUGGESTIONS" - The returned document is a preview with // all suggested changes rejected if there are any suggestions in the document. SuggestionsViewMode string `json:"suggestionsViewMode,omitempty"` + // Tabs: Tabs that are part of a document. Tabs can contain child tabs, a tab + // nested within another tab. Child tabs are represented by the Tab.child_tabs + // field. + Tabs []*Tab `json:"tabs,omitempty"` // Title: The title of the document. Title string `json:"title,omitempty"` @@ -1365,6 +1422,53 @@ func (s DocumentStyleSuggestionState) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DocumentTab: A tab with document contents. +type DocumentTab struct { + // Body: The main body of the document tab. + Body *Body `json:"body,omitempty"` + // DocumentStyle: The style of the document tab. + DocumentStyle *DocumentStyle `json:"documentStyle,omitempty"` + // Footers: The footers in the document tab, keyed by footer ID. + Footers map[string]Footer `json:"footers,omitempty"` + // Footnotes: The footnotes in the document tab, keyed by footnote ID. + Footnotes map[string]Footnote `json:"footnotes,omitempty"` + // Headers: The headers in the document tab, keyed by header ID. + Headers map[string]Header `json:"headers,omitempty"` + // InlineObjects: The inline objects in the document tab, keyed by object ID. + InlineObjects map[string]InlineObject `json:"inlineObjects,omitempty"` + // Lists: The lists in the document tab, keyed by list ID. + Lists map[string]List `json:"lists,omitempty"` + // NamedRanges: The named ranges in the document tab, keyed by name. + NamedRanges map[string]NamedRanges `json:"namedRanges,omitempty"` + // NamedStyles: The named styles of the document tab. + NamedStyles *NamedStyles `json:"namedStyles,omitempty"` + // PositionedObjects: The positioned objects in the document tab, keyed by + // object ID. + PositionedObjects map[string]PositionedObject `json:"positionedObjects,omitempty"` + // SuggestedDocumentStyleChanges: The suggested changes to the style of the + // document tab, keyed by suggestion ID. + SuggestedDocumentStyleChanges map[string]SuggestedDocumentStyle `json:"suggestedDocumentStyleChanges,omitempty"` + // SuggestedNamedStylesChanges: The suggested changes to the named styles of + // the document tab, keyed by suggestion ID. + SuggestedNamedStylesChanges map[string]SuggestedNamedStyles `json:"suggestedNamedStylesChanges,omitempty"` + // ForceSendFields is a list of field names (e.g. "Body") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Body") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DocumentTab) MarshalJSON() ([]byte, error) { + type NoMethod DocumentTab + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // EmbeddedDrawingProperties: The properties of an embedded drawing and used to // differentiate the object type. An embedded drawing is one that's created and // edited within a document. Note that extensive details are not supported. @@ -1559,6 +1663,13 @@ type EndOfSegmentLocation struct { // SegmentId: The ID of the header, footer or footnote the location is in. An // empty segment ID signifies the document's body. SegmentId string `json:"segmentId,omitempty"` + // TabId: The tab that the location is in. When omitted, the request is applied + // to the first tab. In a document containing a single tab: - If provided, must + // match the singular tab's ID. - If omitted, the request applies to the + // singular tab. In a document containing multiple tabs: - If provided, the + // request applies to the specified tab. - If omitted, the request applies to + // the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "SegmentId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1718,6 +1829,30 @@ func (s Header) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// HeadingLink: A reference to a heading in this document. +type HeadingLink struct { + // Id: The ID of a heading in this document. + Id string `json:"id,omitempty"` + // TabId: The ID of the tab containing this heading. + TabId string `json:"tabId,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 HeadingLink) MarshalJSON() ([]byte, error) { + type NoMethod HeadingLink + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // HorizontalRule: A ParagraphElement representing a horizontal line. type HorizontalRule struct { // SuggestedDeletionIds: The suggested deletion IDs. If empty, then there are @@ -2274,19 +2409,31 @@ func (s InsertTextRequest) MarshalJSON() ([]byte, error) { // Link: A reference to another portion of a document or an external URL // resource. type Link struct { + // Bookmark: A bookmark in this document. In documents containing a single tab, + // links to bookmarks within the singular tab continue to return + // Link.bookmark_id when the includeTabsContent parameter is set to `false` or + // unset. Otherwise, this field is returned. + Bookmark *BookmarkLink `json:"bookmark,omitempty"` // BookmarkId: The ID of a bookmark in this document. BookmarkId string `json:"bookmarkId,omitempty"` + // Heading: A heading in this document. In documents containing a single tab, + // links to headings within the singular tab continue to return Link.heading_id + // when the includeTabsContent parameter is set to `false` or unset. Otherwise, + // this field is returned. + Heading *HeadingLink `json:"heading,omitempty"` // HeadingId: The ID of a heading in this document. HeadingId string `json:"headingId,omitempty"` + // TabId: The ID of a tab in this document. + TabId string `json:"tabId,omitempty"` // Url: An external URL. Url string `json:"url,omitempty"` - // ForceSendFields is a list of field names (e.g. "BookmarkId") to + // ForceSendFields is a list of field names (e.g. "Bookmark") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BookmarkId") to include in API + // NullFields is a list of field names (e.g. "Bookmark") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -2442,6 +2589,13 @@ type Location struct { // SegmentId: The ID of the header, footer or footnote the location is in. An // empty segment ID signifies the document's body. SegmentId string `json:"segmentId,omitempty"` + // TabId: The tab that the location is in. When omitted, the request is applied + // to the first tab. In a document containing a single tab: - If provided, must + // match the singular tab's ID. - If omitted, the request applies to the + // singular tab. In a document containing multiple tabs: - If provided, the + // request applies to the specified tab. - If omitted, the request applies to + // the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "Index") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -3535,6 +3689,13 @@ type Range struct { // In all current uses, a start index must be provided. This field is an // Int32Value in order to accommodate future use cases with open-ended ranges. StartIndex int64 `json:"startIndex,omitempty"` + // TabId: The tab that contains this range. When omitted, the request applies + // to the first tab. In a document containing a single tab: - If provided, must + // match the singular tab's ID. - If omitted, the request applies to the + // singular tab. In a document containing multiple tabs: - If provided, the + // request applies to the specified tab. - If omitted, the request applies to + // the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3560,6 +3721,13 @@ type ReplaceAllTextRequest struct { ContainsText *SubstringMatchCriteria `json:"containsText,omitempty"` // ReplaceText: The text that will replace the matched text. ReplaceText string `json:"replaceText,omitempty"` + // TabsCriteria: Optional. The criteria used to specify in which tabs the + // replacement occurs. When omitted, the replacement applies to all tabs. In a + // document containing a single tab: - If provided, must match the singular + // tab's ID. - If omitted, the replacement applies to the singular tab. In a + // document containing multiple tabs: - If provided, the replacement applies to + // the specified tabs. - If omitted, the replacement applies to all tabs. + TabsCriteria *TabsCriteria `json:"tabsCriteria,omitempty"` // ForceSendFields is a list of field names (e.g. "ContainsText") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -3617,6 +3785,13 @@ type ReplaceImageRequest struct { // image's bounds. The rendered size of the image will be the same as the // original image. ImageReplaceMethod string `json:"imageReplaceMethod,omitempty"` + // TabId: The tab that the image to be replaced is in. When omitted, the + // request is applied to the first tab. In a document containing a single tab: + // - If provided, must match the singular tab's ID. - If omitted, the request + // applies to the singular tab. In a document containing multiple tabs: - If + // provided, the request applies to the specified tab. - If omitted, the + // request applies to the first tab in the document. + TabId string `json:"tabId,omitempty"` // Uri: The URI of the new image. The image is fetched once at insertion time // and a copy is stored for display inside the document. Images must be less // than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF @@ -3658,6 +3833,13 @@ type ReplaceNamedRangeContentRequest struct { // each one will be replaced. If there are no named ranges with the given name, // then the request will be a no-op. NamedRangeName string `json:"namedRangeName,omitempty"` + // TabsCriteria: Optional. The criteria used to specify in which tabs the + // replacement occurs. When omitted, the replacement applies to all tabs. In a + // document containing a single tab: - If provided, must match the singular + // tab's ID. - If omitted, the replacement applies to the singular tab. In a + // document containing multiple tabs: - If provided, the replacement applies to + // the specified tabs. - If omitted, the replacement applies to all tabs. + TabsCriteria *TabsCriteria `json:"tabsCriteria,omitempty"` // Text: Replaces the content of the specified named range(s) with the given // text. Text string `json:"text,omitempty"` @@ -4620,6 +4802,64 @@ func (s SuggestedTextStyle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Tab: A tab in a document. +type Tab struct { + // ChildTabs: The child tabs nested within this tab. + ChildTabs []*Tab `json:"childTabs,omitempty"` + // DocumentTab: A tab with document contents, like text and images. + DocumentTab *DocumentTab `json:"documentTab,omitempty"` + // TabProperties: The properties of the tab, like ID and title. + TabProperties *TabProperties `json:"tabProperties,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChildTabs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChildTabs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Tab) MarshalJSON() ([]byte, error) { + type NoMethod Tab + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// TabProperties: Properties of a tab. +type TabProperties struct { + // Index: The index of the tab within the parent. + Index int64 `json:"index,omitempty"` + // NestingLevel: Output only. The depth of the tab within the document. + // Root-level tabs start at 0. + NestingLevel int64 `json:"nestingLevel,omitempty"` + // ParentTabId: Optional. The ID of the parent tab. Empty when the current tab + // is a root-level tab, which means it doesn't have any parents. + ParentTabId string `json:"parentTabId,omitempty"` + // TabId: Output only. The ID of the tab. This field can't be changed. + TabId string `json:"tabId,omitempty"` + // Title: The user-visible name of the tab. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "Index") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Index") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TabProperties) MarshalJSON() ([]byte, error) { + type NoMethod TabProperties + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // TabStop: A tab stop within a paragraph. type TabStop struct { // Alignment: The alignment of this tab stop. If unset, the value defaults to @@ -5120,6 +5360,28 @@ func (s TableStyle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// TabsCriteria: A criteria that specifies in which tabs a request executes. +type TabsCriteria struct { + // TabIds: The list of tab IDs in which the request executes. + TabIds []string `json:"tabIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "TabIds") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TabIds") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s TabsCriteria) MarshalJSON() ([]byte, error) { + type NoMethod TabsCriteria + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // TextRun: A ParagraphElement that represents a run of text that all has the // same styling. type TextRun struct { @@ -5327,6 +5589,13 @@ type UpdateDocumentStyleRequest struct { // A single "*" can be used as short-hand for listing every field. For // example to update the background, set `fields` to "background". Fields string `json:"fields,omitempty"` + // TabId: The tab that contains the style to update. When omitted, the request + // applies to the first tab. In a document containing a single tab: - If + // provided, must match the singular tab's ID. - If omitted, the request + // applies to the singular tab. In a document containing multiple tabs: - If + // provided, the request applies to the specified tab. - If not provided, the + // request applies to the first tab in the document. + TabId string `json:"tabId,omitempty"` // ForceSendFields is a list of field names (e.g. "DocumentStyle") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -5866,6 +6135,19 @@ func (r *DocumentsService) Get(documentId string) *DocumentsGetCall { return c } +// IncludeTabsContent sets the optional parameter "includeTabsContent": Whether +// to populate the Document.tabs field instead of the text content fields like +// body and documentStyle on Document. - When `True`: Document content +// populates in the Document.tabs field instead of the text content fields in +// Document. - When `False`: The content of the document's first tab populates +// the content fields in Document excluding Document.tabs. If a document has +// only one tab, then that tab is used to populate the document content. +// Document.tabs will be empty. +func (c *DocumentsGetCall) IncludeTabsContent(includeTabsContent bool) *DocumentsGetCall { + c.urlParams_.Set("includeTabsContent", fmt.Sprint(includeTabsContent)) + return c +} + // SuggestionsViewMode sets the optional parameter "suggestionsViewMode": The // suggestions view mode to apply to the document. This allows viewing the // document with all suggestions inline, accepted or rejected. If one is not diff --git a/documentai/v1/documentai-api.json b/documentai/v1/documentai-api.json index ede5f2e0596..b35165ed3eb 100644 --- a/documentai/v1/documentai-api.json +++ b/documentai/v1/documentai-api.json @@ -1042,7 +1042,7 @@ } } }, - "revision": "20240615", + "revision": "20240716", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -4686,6 +4686,11 @@ "$ref": "GoogleCloudDocumentaiV1DocumentSchema", "description": "The schema of the processor version. Describes the output." }, + "genAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo", + "description": "Output only. Information about Generative AI model-based processor versions.", + "readOnly": true + }, "googleManaged": { "description": "Output only. Denotes that this `ProcessorVersion` is managed by Google.", "readOnly": true, @@ -4793,6 +4798,62 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo": { + "description": "Information about Generative AI model-based processor versions.", + "id": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo", + "properties": { + "customGenAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo", + "description": "Information for a custom Generative AI model created by the user." + }, + "foundationGenAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo", + "description": "Information for a pretrained Google-managed foundation model." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo": { + "description": "Information for a custom Generative AI model created by the user. These are created with `Create New Version` in either the `Call foundation model` or `Fine tuning` tabs.", + "id": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo", + "properties": { + "baseProcessorVersionId": { + "description": "The base processor version ID for the custom model.", + "type": "string" + }, + "customModelType": { + "description": "The type of custom model created by the user.", + "enum": [ + "CUSTOM_MODEL_TYPE_UNSPECIFIED", + "VERSIONED_FOUNDATION", + "FINE_TUNED" + ], + "enumDescriptions": [ + "The model type is unspecified.", + "The model is a versioned foundation model.", + "The model is a finetuned foundation model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo": { + "description": "Information for a pretrained Google-managed foundation model.", + "id": "GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo", + "properties": { + "finetuningAllowed": { + "description": "Whether finetuning is allowed for this base processor version.", + "type": "boolean" + }, + "minTrainLabeledDocuments": { + "description": "The minimum number of labeled documents in the training dataset required for finetuning.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1RawDocument": { "description": "Payload message of raw document content (bytes).", "id": "GoogleCloudDocumentaiV1RawDocument", diff --git a/documentai/v1/documentai-gen.go b/documentai/v1/documentai-gen.go index e4c52c27798..d942a0a2fe8 100644 --- a/documentai/v1/documentai-gen.go +++ b/documentai/v1/documentai-gen.go @@ -5087,6 +5087,9 @@ type GoogleCloudDocumentaiV1ProcessorVersion struct { DisplayName string `json:"displayName,omitempty"` // DocumentSchema: The schema of the processor version. Describes the output. DocumentSchema *GoogleCloudDocumentaiV1DocumentSchema `json:"documentSchema,omitempty"` + // GenAiModelInfo: Output only. Information about Generative AI model-based + // processor versions. + GenAiModelInfo *GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo `json:"genAiModelInfo,omitempty"` // GoogleManaged: Output only. Denotes that this `ProcessorVersion` is managed // by Google. GoogleManaged bool `json:"googleManaged,omitempty"` @@ -5201,6 +5204,92 @@ func (s GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo) MarshalJSON() ([ return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo: Information about +// Generative AI model-based processor versions. +type GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo struct { + // CustomGenAiModelInfo: Information for a custom Generative AI model created + // by the user. + CustomGenAiModelInfo *GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo `json:"customGenAiModelInfo,omitempty"` + // FoundationGenAiModelInfo: Information for a pretrained Google-managed + // foundation model. + FoundationGenAiModelInfo *GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo `json:"foundationGenAiModelInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomGenAiModelInfo") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomGenAiModelInfo") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo: +// Information for a custom Generative AI model created by the user. These are +// created with `Create New Version` in either the `Call foundation model` or +// `Fine tuning` tabs. +type GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo struct { + // BaseProcessorVersionId: The base processor version ID for the custom model. + BaseProcessorVersionId string `json:"baseProcessorVersionId,omitempty"` + // CustomModelType: The type of custom model created by the user. + // + // Possible values: + // "CUSTOM_MODEL_TYPE_UNSPECIFIED" - The model type is unspecified. + // "VERSIONED_FOUNDATION" - The model is a versioned foundation model. + // "FINE_TUNED" - The model is a finetuned foundation model. + CustomModelType string `json:"customModelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaseProcessorVersionId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BaseProcessorVersionId") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoCustomGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo +// : Information for a pretrained Google-managed foundation model. +type GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo struct { + // FinetuningAllowed: Whether finetuning is allowed for this base processor + // version. + FinetuningAllowed bool `json:"finetuningAllowed,omitempty"` + // MinTrainLabeledDocuments: The minimum number of labeled documents in the + // training dataset required for finetuning. + MinTrainLabeledDocuments int64 `json:"minTrainLabeledDocuments,omitempty"` + // ForceSendFields is a list of field names (e.g. "FinetuningAllowed") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FinetuningAllowed") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1RawDocument: Payload message of raw document content // (bytes). type GoogleCloudDocumentaiV1RawDocument struct { diff --git a/documentai/v1beta3/documentai-api.json b/documentai/v1beta3/documentai-api.json index dbefc13fd49..2f94a28dca8 100644 --- a/documentai/v1beta3/documentai-api.json +++ b/documentai/v1beta3/documentai-api.json @@ -1284,7 +1284,7 @@ } } }, - "revision": "20240615", + "revision": "20240716", "rootUrl": "https://documentai.googleapis.com/", "schemas": { "GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadata": { @@ -9293,6 +9293,11 @@ "$ref": "GoogleCloudDocumentaiV1beta3DocumentSchema", "description": "The schema of the processor version. Describes the output." }, + "genAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo", + "description": "Output only. Information about Generative AI model-based processor versions.", + "readOnly": true + }, "googleManaged": { "description": "Output only. Denotes that this `ProcessorVersion` is managed by Google.", "readOnly": true, @@ -9400,6 +9405,62 @@ }, "type": "object" }, + "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo": { + "description": "Information about Generative AI model-based processor versions.", + "id": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo", + "properties": { + "customGenAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo", + "description": "Information for a custom Generative AI model created by the user." + }, + "foundationGenAiModelInfo": { + "$ref": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo", + "description": "Information for a pretrained Google-managed foundation model." + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo": { + "description": "Information for a custom Generative AI model created by the user. These are created with `Create New Version` in either the `Call foundation model` or `Fine tuning` tabs.", + "id": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo", + "properties": { + "baseProcessorVersionId": { + "description": "The base processor version ID for the custom model.", + "type": "string" + }, + "customModelType": { + "description": "The type of custom model created by the user.", + "enum": [ + "CUSTOM_MODEL_TYPE_UNSPECIFIED", + "VERSIONED_FOUNDATION", + "FINE_TUNED" + ], + "enumDescriptions": [ + "The model type is unspecified.", + "The model is a versioned foundation model.", + "The model is a finetuned foundation model." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo": { + "description": "Information for a pretrained Google-managed foundation model.", + "id": "GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo", + "properties": { + "finetuningAllowed": { + "description": "Whether finetuning is allowed for this base processor version.", + "type": "boolean" + }, + "minTrainLabeledDocuments": { + "description": "The minimum number of labeled documents in the training dataset required for finetuning.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDocumentaiV1beta3PropertyMetadata": { "description": "Metadata about a property.", "id": "GoogleCloudDocumentaiV1beta3PropertyMetadata", diff --git a/documentai/v1beta3/documentai-gen.go b/documentai/v1beta3/documentai-gen.go index 711e6b53832..d43435983d5 100644 --- a/documentai/v1beta3/documentai-gen.go +++ b/documentai/v1beta3/documentai-gen.go @@ -10818,6 +10818,9 @@ type GoogleCloudDocumentaiV1beta3ProcessorVersion struct { DisplayName string `json:"displayName,omitempty"` // DocumentSchema: The schema of the processor version. Describes the output. DocumentSchema *GoogleCloudDocumentaiV1beta3DocumentSchema `json:"documentSchema,omitempty"` + // GenAiModelInfo: Output only. Information about Generative AI model-based + // processor versions. + GenAiModelInfo *GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo `json:"genAiModelInfo,omitempty"` // GoogleManaged: Output only. Denotes that this `ProcessorVersion` is managed // by Google. GoogleManaged bool `json:"googleManaged,omitempty"` @@ -10932,6 +10935,92 @@ func (s GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo: Information +// about Generative AI model-based processor versions. +type GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo struct { + // CustomGenAiModelInfo: Information for a custom Generative AI model created + // by the user. + CustomGenAiModelInfo *GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo `json:"customGenAiModelInfo,omitempty"` + // FoundationGenAiModelInfo: Information for a pretrained Google-managed + // foundation model. + FoundationGenAiModelInfo *GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo `json:"foundationGenAiModelInfo,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomGenAiModelInfo") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomGenAiModelInfo") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInf +// o: Information for a custom Generative AI model created by the user. These +// are created with `Create New Version` in either the `Call foundation model` +// or `Fine tuning` tabs. +type GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo struct { + // BaseProcessorVersionId: The base processor version ID for the custom model. + BaseProcessorVersionId string `json:"baseProcessorVersionId,omitempty"` + // CustomModelType: The type of custom model created by the user. + // + // Possible values: + // "CUSTOM_MODEL_TYPE_UNSPECIFIED" - The model type is unspecified. + // "VERSIONED_FOUNDATION" - The model is a versioned foundation model. + // "FINE_TUNED" - The model is a finetuned foundation model. + CustomModelType string `json:"customModelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaseProcessorVersionId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BaseProcessorVersionId") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoCustomGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiMode +// lInfo: Information for a pretrained Google-managed foundation model. +type GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo struct { + // FinetuningAllowed: Whether finetuning is allowed for this base processor + // version. + FinetuningAllowed bool `json:"finetuningAllowed,omitempty"` + // MinTrainLabeledDocuments: The minimum number of labeled documents in the + // training dataset required for finetuning. + MinTrainLabeledDocuments int64 `json:"minTrainLabeledDocuments,omitempty"` + // ForceSendFields is a list of field names (e.g. "FinetuningAllowed") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FinetuningAllowed") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDocumentaiV1beta3ProcessorVersionGenAiModelInfoFoundationGenAiModelInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDocumentaiV1beta3PropertyMetadata: Metadata about a property. type GoogleCloudDocumentaiV1beta3PropertyMetadata struct { // FieldExtractionMetadata: Field extraction metadata on the property. diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json index c2f3b01ec24..d50643ea384 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json @@ -585,7 +585,7 @@ } } }, - "revision": "20240710", + "revision": "20240717", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "GoogleFirebaseAppdistroV1Release": { @@ -875,14 +875,16 @@ "CRASHED", "NOT_INSTALLED", "UNABLE_TO_CRAWL", - "DEVICE_OUT_OF_MEMORY" + "DEVICE_OUT_OF_MEMORY", + "FAILED_AI_STEP" ], "enumDescriptions": [ "Reason unspecified.", "The app crashed during the test.", "If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform.", "If the app could not be crawled (possibly because the app did not start).", - "If the device ran out of memory during the test." + "If the device ran out of memory during the test.", + "At least one AI step failed." ], "readOnly": true, "type": "string" diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go index ffb05ee3844..5c834383389 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go @@ -617,6 +617,7 @@ type GoogleFirebaseAppdistroV1alphaDeviceExecution struct { // "UNABLE_TO_CRAWL" - If the app could not be crawled (possibly because the // app did not start). // "DEVICE_OUT_OF_MEMORY" - If the device ran out of memory during the test. + // "FAILED_AI_STEP" - At least one AI step failed. FailedReason string `json:"failedReason,omitempty"` // InconclusiveReason: Output only. The reason why the test was inconclusive. // diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 5dfda212e3d..3b409e6e31d 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20240703", + "revision": "20240719", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -282,14 +282,14 @@ ], "enumDescriptions": [ "The finish reason is unspecified.", - "Natural stop point of the model or provided stop sequence.", - "The maximum number of tokens as specified in the request was reached.", - "The token generation was stopped as the response was flagged for safety reasons. NOTE: When streaming the Candidate.content will be empty if content filters blocked the output.", - "The token generation was stopped as the response was flagged for unauthorized citations.", - "All other reasons that stopped the token generation", - "The token generation was stopped as the response was flagged for the terms which are included from the terminology blocklist.", - "The token generation was stopped as the response was flagged for the prohibited contents.", - "The token generation was stopped as the response was flagged for Sensitive Personally Identifiable Information (SPII) contents.", + "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 copyright violations.", + "All other reasons that stopped the token generation.", + "Token generation stopped because the content contains forbidden terms.", + "Token generation stopped for potentially containing prohibited content.", + "Token generation stopped because the content potentially contains Sensitive Personally Identifiable Information (SPII).", "The function call generated by the model is invalid." ], "readOnly": true, @@ -313,12 +313,6 @@ }, "readOnly": true, "type": "array" - }, - "score": { - "description": "Output only. Confidence score of the candidate.", - "format": "double", - "readOnly": true, - "type": "number" } }, "type": "object" @@ -714,6 +708,11 @@ "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." }, + "seed": { + "description": "Optional. Seed.", + "format": "int32", + "type": "integer" + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -892,7 +891,8 @@ "id": "GoogleCloudAiplatformV1beta1Retrieval", "properties": { "disableAttribution": { - "description": "Optional. Disable using the result from this tool in detecting grounding attribution. This does not affect how the result is given to the model for generation.", + "deprecated": true, + "description": "Optional. Deprecated. This option is no longer supported.", "type": "boolean" }, "vertexAiSearch": { diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 94ee0e2062c..49a57335d70 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -277,21 +277,22 @@ type GoogleCloudAiplatformV1beta1Candidate struct { // // Possible values: // "FINISH_REASON_UNSPECIFIED" - The finish reason is unspecified. - // "STOP" - Natural stop point of the model or provided stop sequence. - // "MAX_TOKENS" - The maximum number of tokens as specified in the request - // was reached. - // "SAFETY" - The token generation was stopped as the response was flagged - // for safety reasons. NOTE: When streaming the Candidate.content will be empty - // if content filters blocked the output. - // "RECITATION" - The token generation was stopped as the response was - // flagged for unauthorized citations. - // "OTHER" - All other reasons that stopped the token generation - // "BLOCKLIST" - The token generation was stopped as the response was flagged - // for the terms which are included from the terminology blocklist. - // "PROHIBITED_CONTENT" - The token generation was stopped as the response - // was flagged for the prohibited contents. - // "SPII" - The token generation was stopped as the response was flagged for - // Sensitive Personally Identifiable Information (SPII) contents. + // "STOP" - Token generation reached a natural stopping point or a configured + // stop sequence. + // "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. + // "RECITATION" - Token generation stopped because the content potentially + // contains copyright violations. + // "OTHER" - All other reasons that stopped the token generation. + // "BLOCKLIST" - Token generation stopped because the content contains + // forbidden terms. + // "PROHIBITED_CONTENT" - Token generation stopped for potentially containing + // prohibited content. + // "SPII" - Token generation stopped because the content potentially contains + // Sensitive Personally Identifiable Information (SPII). // "MALFORMED_FUNCTION_CALL" - The function call generated by the model is // invalid. FinishReason string `json:"finishReason,omitempty"` @@ -303,8 +304,6 @@ 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"` - // Score: Output only. Confidence score of the candidate. - Score float64 `json:"score,omitempty"` // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -323,20 +322,6 @@ 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 { - 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 -} - // GoogleCloudAiplatformV1beta1Citation: Source attributions for content. type GoogleCloudAiplatformV1beta1Citation struct { // EndIndex: Output only. End index into the content. @@ -824,6 +809,8 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // response_mime_type must also be set. Compatible mimetypes: // `application/json`: Schema for JSON response. ResponseSchema *GoogleCloudAiplatformV1beta1Schema `json:"responseSchema,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. @@ -1079,9 +1066,8 @@ func (s GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error) { // GoogleCloudAiplatformV1beta1Retrieval: Defines a retrieval tool that model // can call to access external knowledge. type GoogleCloudAiplatformV1beta1Retrieval struct { - // DisableAttribution: Optional. Disable using the result from this tool in - // detecting grounding attribution. This does not affect how the result is - // given to the model for generation. + // DisableAttribution: Optional. Deprecated. This option is no longer + // supported. DisableAttribution bool `json:"disableAttribution,omitempty"` // VertexAiSearch: Set to use data source powered by Vertex AI Search. VertexAiSearch *GoogleCloudAiplatformV1beta1VertexAISearch `json:"vertexAiSearch,omitempty"` diff --git a/firestore/v1/firestore-api.json b/firestore/v1/firestore-api.json index 3baeb1314ce..8a9b291ff6d 100644 --- a/firestore/v1/firestore-api.json +++ b/firestore/v1/firestore-api.json @@ -1706,7 +1706,7 @@ } } }, - "revision": "20240630", + "revision": "20240713", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -2388,7 +2388,7 @@ "type": "object" }, "FindNearest": { - "description": "Nearest Neighbors search config.", + "description": "Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.", "id": "FindNearest", "properties": { "distanceMeasure": { @@ -2499,7 +2499,7 @@ "type": "string" }, "retention": { - "description": "At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention is 14 weeks.", + "description": "At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. The maximum supported retention period is 14 weeks.", "format": "google-duration", "type": "string" }, @@ -2633,12 +2633,7 @@ "GoogleFirestoreAdminV1DailyRecurrence": { "description": "Represents a recurring schedule that runs every day. The time zone is UTC.", "id": "GoogleFirestoreAdminV1DailyRecurrence", - "properties": { - "time": { - "$ref": "TimeOfDay", - "description": "Time of the day. The first run scheduled will be either on the same day if schedule creation time precedes time_of_day or the next day otherwise." - } - }, + "properties": {}, "type": "object" }, "GoogleFirestoreAdminV1Database": { @@ -3602,10 +3597,6 @@ "Sunday" ], "type": "string" - }, - "time": { - "$ref": "TimeOfDay", - "description": "Time of the day. If day is today, the first run will happen today if schedule creation time precedes time_of_day, and the next week otherwise." } }, "type": "object" @@ -4341,33 +4332,6 @@ }, "type": "object" }, - "TimeOfDay": { - "description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", - "id": "TimeOfDay", - "properties": { - "hours": { - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", - "format": "int32", - "type": "integer" - }, - "minutes": { - "description": "Minutes of hour of day. Must be from 0 to 59.", - "format": "int32", - "type": "integer" - }, - "nanos": { - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "format": "int32", - "type": "integer" - }, - "seconds": { - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, "TransactionOptions": { "description": "Options for creating a new transaction.", "id": "TransactionOptions", diff --git a/firestore/v1/firestore-gen.go b/firestore/v1/firestore-gen.go index 1de86c43192..febd335a59c 100644 --- a/firestore/v1/firestore-gen.go +++ b/firestore/v1/firestore-gen.go @@ -1354,7 +1354,10 @@ func (s Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// FindNearest: Nearest Neighbors search config. +// FindNearest: Nearest Neighbors search config. The ordering provided by +// FindNearest supersedes the order_by stage. If multiple documents have the +// same vector distance, the returned document order is not guaranteed to be +// stable between queries. type FindNearest struct { // DistanceMeasure: Required. The distance measure to use, required. // @@ -1469,7 +1472,7 @@ type GoogleFirestoreAdminV1BackupSchedule struct { Name string `json:"name,omitempty"` // Retention: At what relative time in the future, compared to its creation // time, the backup should be deleted, e.g. keep backups for 7 days. The - // maximum supported retention is 14 weeks. + // maximum supported retention period is 14 weeks. Retention string `json:"retention,omitempty"` // UpdateTime: Output only. The timestamp at which this backup schedule was // most recently updated. When a backup schedule is first created, this is the @@ -1633,26 +1636,6 @@ type GoogleFirestoreAdminV1CreateDatabaseMetadata struct { // GoogleFirestoreAdminV1DailyRecurrence: Represents a recurring schedule that // runs every day. The time zone is UTC. type GoogleFirestoreAdminV1DailyRecurrence struct { - // Time: Time of the day. The first run scheduled will be either on the same - // day if schedule creation time precedes time_of_day or the next day - // otherwise. - Time *TimeOfDay `json:"time,omitempty"` - // ForceSendFields is a list of field names (e.g. "Time") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Time") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleFirestoreAdminV1DailyRecurrence) MarshalJSON() ([]byte, error) { - type NoMethod GoogleFirestoreAdminV1DailyRecurrence - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // GoogleFirestoreAdminV1Database: A Cloud Firestore Database. @@ -2778,9 +2761,6 @@ type GoogleFirestoreAdminV1WeeklyRecurrence struct { // "SATURDAY" - Saturday // "SUNDAY" - Sunday Day string `json:"day,omitempty"` - // Time: Time of the day. If day is today, the first run will happen today if - // schedule creation time precedes time_of_day, and the next week otherwise. - Time *TimeOfDay `json:"time,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 @@ -3897,39 +3877,6 @@ func (s TargetChange) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// TimeOfDay: Represents a time of day. The date and time zone are either not -// significant or are specified elsewhere. An API may choose to allow leap -// seconds. Related types are google.type.Date and `google.protobuf.Timestamp`. -type TimeOfDay struct { - // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API may - // choose to allow the value "24:00:00" for scenarios like business closing - // time. - Hours int64 `json:"hours,omitempty"` - // Minutes: Minutes of hour of day. Must be from 0 to 59. - Minutes int64 `json:"minutes,omitempty"` - // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - Nanos int64 `json:"nanos,omitempty"` - // Seconds: Seconds of minutes of the time. Must normally be from 0 to 59. An - // API may allow the value 60 if it allows leap-seconds. - Seconds int64 `json:"seconds,omitempty"` - // ForceSendFields is a list of field names (e.g. "Hours") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Hours") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TimeOfDay) MarshalJSON() ([]byte, error) { - type NoMethod TimeOfDay - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // TransactionOptions: Options for creating a new transaction. type TransactionOptions struct { // ReadOnly: The transaction can only be used for read operations. diff --git a/firestore/v1beta1/firestore-api.json b/firestore/v1beta1/firestore-api.json index b7938f7cb63..28fec8b45a9 100644 --- a/firestore/v1beta1/firestore-api.json +++ b/firestore/v1beta1/firestore-api.json @@ -950,7 +950,7 @@ } } }, - "revision": "20240617", + "revision": "20240713", "rootUrl": "https://firestore.googleapis.com/", "schemas": { "Aggregation": { @@ -1632,7 +1632,7 @@ "type": "object" }, "FindNearest": { - "description": "Nearest Neighbors search config.", + "description": "Nearest Neighbors search config. The ordering provided by FindNearest supersedes the order_by stage. If multiple documents have the same vector distance, the returned document order is not guaranteed to be stable between queries.", "id": "FindNearest", "properties": { "distanceMeasure": { diff --git a/firestore/v1beta1/firestore-gen.go b/firestore/v1beta1/firestore-gen.go index 87b23843b05..854521ec28c 100644 --- a/firestore/v1beta1/firestore-gen.go +++ b/firestore/v1beta1/firestore-gen.go @@ -1282,7 +1282,10 @@ func (s Filter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// FindNearest: Nearest Neighbors search config. +// FindNearest: Nearest Neighbors search config. The ordering provided by +// FindNearest supersedes the order_by stage. If multiple documents have the +// same vector distance, the returned document order is not guaranteed to be +// stable between queries. type FindNearest struct { // DistanceMeasure: Required. The distance measure to use, required. // diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index b61f965be53..b0e16e4a727 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -4554,7 +4554,7 @@ } } }, - "revision": "20240619", + "revision": "20240718", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -5151,7 +5151,7 @@ "description": "Configures de-identification of text wherever it is found in the source_dataset." }, "useRegionalDataProcessing": { - "description": "Ensures in-flight data remains in the region of origin during de-identification. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.", + "description": "Ensures in-flight data remains in the region of origin during de-identification. The default value is false. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.", "type": "boolean" } }, @@ -5678,11 +5678,11 @@ "type": "string" }, "sendFullResource": { - "description": "Whether to send full FHIR resource to this Pub/Sub topic.", + "description": "Whether to send full FHIR resource to this Pub/Sub topic. The default value is false.", "type": "boolean" }, "sendPreviousResourceOnDelete": { - "description": "Whether to send full FHIR resource to this Pub/Sub topic for deleting FHIR resource. Note that setting this to true does not guarantee that all previous resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full previous resource as a separate operation.", + "description": "Whether to send full FHIR resource to this Pub/Sub topic for deleting FHIR resource. The default value is false. Note that setting this to true does not guarantee that all previous resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full previous resource as a separate operation.", "type": "boolean" } }, @@ -5707,7 +5707,7 @@ "type": "string" }, "defaultSearchHandlingStrict": { - "description": "If true, overrides the default search behavior for this FHIR store to `handling=strict` which returns an error for unrecognized search parameters. If false, uses the FHIR specification default `handling=lenient` which ignores unrecognized search parameters. The handling can always be changed from the default on an individual API call by setting the HTTP header `Prefer: handling=strict` or `Prefer: handling=lenient`.", + "description": "If true, overrides the default search behavior for this FHIR store to `handling=strict` which returns an error for unrecognized search parameters. If false, uses the FHIR specification default `handling=lenient` which ignores unrecognized search parameters. The handling can always be changed from the default on an individual API call by setting the HTTP header `Prefer: handling=strict` or `Prefer: handling=lenient`. Defaults to false.", "type": "boolean" }, "disableReferentialIntegrity": { @@ -5715,11 +5715,11 @@ "type": "boolean" }, "disableResourceVersioning": { - "description": "Immutable. Whether to disable resource versioning for this FHIR store. This field can not be changed after the creation of FHIR store. If set to false, which is the default behavior, all write operations cause historical versions to be recorded automatically. The historical versions can be fetched through the history APIs, but cannot be updated. If set to true, no historical versions are kept. The server sends errors for attempts to read the historical versions.", + "description": "Immutable. Whether to disable resource versioning for this FHIR store. This field can not be changed after the creation of FHIR store. If set to false, all write operations cause historical versions to be recorded automatically. The historical versions can be fetched through the history APIs, but cannot be updated. If set to true, no historical versions are kept. The server sends errors for attempts to read the historical versions. Defaults to false.", "type": "boolean" }, "enableUpdateCreate": { - "description": "Whether this FHIR store has the [updateCreate capability](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). This determines if the client can use an Update operation to create a new resource with a client-specified ID. If false, all IDs are server-assigned through the Create operation and attempts to update a non-existent resource return errors. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources.", + "description": "Whether this FHIR store has the [updateCreate capability](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). This determines if the client can use an Update operation to create a new resource with a client-specified ID. If false, all IDs are server-assigned through the Create operation and attempts to update a non-existent resource return errors. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources. Defaults to false.", "type": "boolean" }, "labels": { @@ -6045,7 +6045,7 @@ "type": "string" }, "force": { - "description": "If this flag is `TRUE`, all tables are deleted from the dataset before the new exported tables are written. If the flag is not set and the destination dataset contains tables, the export call returns an error. If `write_disposition` is specified, this parameter is ignored. force=false is equivalent to write_disposition=WRITE_EMPTY and force=true is equivalent to write_disposition=WRITE_TRUNCATE.", + "description": "The default value is false. If this flag is `TRUE`, all tables are deleted from the dataset before the new exported tables are written. If the flag is not set and the destination dataset contains tables, the export call returns an error. If `write_disposition` is specified, this parameter is ignored. force=false is equivalent to write_disposition=WRITE_EMPTY and force=true is equivalent to write_disposition=WRITE_TRUNCATE.", "type": "boolean" }, "schemaConfig": { @@ -6743,7 +6743,8 @@ "type": "object" }, "messageType": { - "description": "The message type for this message. MSH-9.1.", + "description": "Output only. The message type for this message. MSH-9.1.", + "readOnly": true, "type": "string" }, "name": { @@ -6757,23 +6758,27 @@ "readOnly": true }, "patientIds": { - "description": "All patient IDs listed in the PID-2, PID-3, and PID-4 segments of this message.", + "description": "Output only. All patient IDs listed in the PID-2, PID-3, and PID-4 segments of this message.", "items": { "$ref": "PatientId" }, + "readOnly": true, "type": "array" }, "schematizedData": { "$ref": "SchematizedData", - "description": "The parsed version of the raw message data schematized according to this store's schemas and type definitions." + "description": "Output only. The parsed version of the raw message data schematized according to this store's schemas and type definitions.", + "readOnly": true }, "sendFacility": { - "description": "The hospital that this message came from. MSH-4.", + "description": "Output only. The hospital that this message came from. MSH-4.", + "readOnly": true, "type": "string" }, "sendTime": { - "description": "The datetime the sending application sent this message. MSH-7.", + "description": "Output only. The datetime the sending application sent this message. MSH-7.", "format": "google-datetime", + "readOnly": true, "type": "string" } }, @@ -7709,19 +7714,19 @@ "id": "ValidationConfig", "properties": { "disableFhirpathValidation": { - "description": "Whether to disable FHIRPath validation for incoming resources. Set this to true to disable checking incoming resources for conformance against FHIRPath requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable FHIRPath validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against FHIRPath requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "disableProfileValidation": { - "description": "Whether to disable profile validation for this FHIR store. Set this to true to disable checking incoming resources for conformance against structure definitions in this FHIR store.", + "description": "Whether to disable profile validation for this FHIR store. The default value is false. Set this to true to disable checking incoming resources for conformance against structure definitions in this FHIR store.", "type": "boolean" }, "disableReferenceTypeValidation": { - "description": "Whether to disable reference type validation for incoming resources. Set this to true to disable checking incoming resources for conformance against reference type requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable reference type validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against reference type requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "disableRequiredFieldValidation": { - "description": "Whether to disable required fields validation for incoming resources. Set this to true to disable checking incoming resources for conformance against required fields requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable required fields validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against required fields requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "enabledImplementationGuides": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index d2b5e700008..6c15bee2e2f 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -1329,11 +1329,11 @@ type DeidentifyConfig struct { // source_dataset. Text *TextConfig `json:"text,omitempty"` // UseRegionalDataProcessing: Ensures in-flight data remains in the region of - // origin during de-identification. Using this option results in a significant - // reduction of throughput, and is not compatible with `LOCATION` or - // `ORGANIZATION_NAME` infoTypes. `LOCATION` must be excluded within - // TextConfig, and must also be excluded within ImageConfig if image redaction - // is required. + // origin during de-identification. The default value is false. Using this + // option results in a significant reduction of throughput, and is not + // compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. `LOCATION` must + // be excluded within TextConfig, and must also be excluded within ImageConfig + // if image redaction is required. UseRegionalDataProcessing bool `json:"useRegionalDataProcessing,omitempty"` // ForceSendFields is a list of field names (e.g. "Dicom") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -2240,14 +2240,16 @@ type FhirNotificationConfig struct { // (https://cloud.google.com/healthcare-api/docs/how-tos/logging). PubsubTopic string `json:"pubsubTopic,omitempty"` // SendFullResource: Whether to send full FHIR resource to this Pub/Sub topic. + // The default value is false. SendFullResource bool `json:"sendFullResource,omitempty"` // SendPreviousResourceOnDelete: Whether to send full FHIR resource to this - // Pub/Sub topic for deleting FHIR resource. Note that setting this to true - // does not guarantee that all previous resources will be sent in the format of - // full FHIR resource. When a resource change is too large or during heavy - // traffic, only the resource name will be sent. Clients should always check - // the "payloadType" label from a Pub/Sub message to determine whether it needs - // to fetch the full previous resource as a separate operation. + // Pub/Sub topic for deleting FHIR resource. The default value is false. Note + // that setting this to true does not guarantee that all previous resources + // will be sent in the format of full FHIR resource. When a resource change is + // too large or during heavy traffic, only the resource name will be sent. + // Clients should always check the "payloadType" label from a Pub/Sub message + // to determine whether it needs to fetch the full previous resource as a + // separate operation. SendPreviousResourceOnDelete bool `json:"sendPreviousResourceOnDelete,omitempty"` // ForceSendFields is a list of field names (e.g. "PubsubTopic") to // unconditionally include in API requests. By default, fields with empty or @@ -2290,7 +2292,7 @@ type FhirStore struct { // default `handling=lenient` which ignores unrecognized search parameters. The // handling can always be changed from the default on an individual API call by // setting the HTTP header `Prefer: handling=strict` or `Prefer: - // handling=lenient`. + // handling=lenient`. Defaults to false. DefaultSearchHandlingStrict bool `json:"defaultSearchHandlingStrict,omitempty"` // DisableReferentialIntegrity: Immutable. Whether to disable referential // integrity in this FHIR store. This field is immutable after FHIR store @@ -2303,11 +2305,11 @@ type FhirStore struct { DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"` // DisableResourceVersioning: Immutable. Whether to disable resource versioning // for this FHIR store. This field can not be changed after the creation of - // FHIR store. If set to false, which is the default behavior, all write - // operations cause historical versions to be recorded automatically. The - // historical versions can be fetched through the history APIs, but cannot be - // updated. If set to true, no historical versions are kept. The server sends - // errors for attempts to read the historical versions. + // FHIR store. If set to false, all write operations cause historical versions + // to be recorded automatically. The historical versions can be fetched through + // the history APIs, but cannot be updated. If set to true, no historical + // versions are kept. The server sends errors for attempts to read the + // historical versions. Defaults to false. DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"` // EnableUpdateCreate: Whether this FHIR store has the updateCreate capability // (https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). @@ -2318,7 +2320,7 @@ type FhirStore struct { // data such as patient identifiers in client-specified resource IDs. Those IDs // are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub // notifications. Those IDs can also be contained in reference fields within - // other resources. + // other resources. Defaults to false. EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"` // Labels: User-supplied key-value pairs used to organize FHIR stores. Label // keys must be between 1 and 63 characters long, have a UTF-8 encoding of @@ -2847,12 +2849,12 @@ type GoogleCloudHealthcareV1FhirBigQueryDestination struct { // DatasetUri: BigQuery URI to an existing dataset, up to 2000 characters long, // in the format `bq://projectId.bqDatasetId`. DatasetUri string `json:"datasetUri,omitempty"` - // Force: If this flag is `TRUE`, all tables are deleted from the dataset - // before the new exported tables are written. If the flag is not set and the - // destination dataset contains tables, the export call returns an error. If - // `write_disposition` is specified, this parameter is ignored. force=false is - // equivalent to write_disposition=WRITE_EMPTY and force=true is equivalent to - // write_disposition=WRITE_TRUNCATE. + // Force: The default value is false. If this flag is `TRUE`, all tables are + // deleted from the dataset before the new exported tables are written. If the + // flag is not set and the destination dataset contains tables, the export call + // returns an error. If `write_disposition` is specified, this parameter is + // ignored. force=false is equivalent to write_disposition=WRITE_EMPTY and + // force=true is equivalent to write_disposition=WRITE_TRUNCATE. Force bool `json:"force,omitempty"` // SchemaConfig: The configuration for the exported BigQuery schema. SchemaConfig *SchemaConfig `json:"schemaConfig,omitempty"` @@ -4004,7 +4006,7 @@ type Message struct { // [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a // given store. Labels map[string]string `json:"labels,omitempty"` - // MessageType: The message type for this message. MSH-9.1. + // MessageType: Output only. The message type for this message. MSH-9.1. MessageType string `json:"messageType,omitempty"` // Name: Output only. Resource name of the Message, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Sto @@ -4012,15 +4014,16 @@ type Message struct { Name string `json:"name,omitempty"` // ParsedData: Output only. The parsed version of the raw message data. ParsedData *ParsedData `json:"parsedData,omitempty"` - // PatientIds: All patient IDs listed in the PID-2, PID-3, and PID-4 segments - // of this message. + // PatientIds: Output only. All patient IDs listed in the PID-2, PID-3, and + // PID-4 segments of this message. PatientIds []*PatientId `json:"patientIds,omitempty"` - // SchematizedData: The parsed version of the raw message data schematized - // according to this store's schemas and type definitions. + // SchematizedData: Output only. The parsed version of the raw message data + // schematized according to this store's schemas and type definitions. SchematizedData *SchematizedData `json:"schematizedData,omitempty"` - // SendFacility: The hospital that this message came from. MSH-4. + // SendFacility: Output only. The hospital that this message came from. MSH-4. SendFacility string `json:"sendFacility,omitempty"` - // SendTime: The datetime the sending application sent this message. MSH-7. + // SendTime: Output only. The datetime the sending application sent this + // message. MSH-7. SendTime string `json:"sendTime,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -5434,29 +5437,30 @@ func (s UserDataMapping) MarshalJSON() ([]byte, error) { // validation. type ValidationConfig struct { // DisableFhirpathValidation: Whether to disable FHIRPath validation for - // incoming resources. Set this to true to disable checking incoming resources - // for conformance against FHIRPath requirement defined in the FHIR - // specification. This property only affects resource types that do not have - // profiles configured for them, any rules in enabled implementation guides - // will still be enforced. + // incoming resources. The default value is false. Set this to true to disable + // checking incoming resources for conformance against FHIRPath requirement + // defined in the FHIR specification. This property only affects resource types + // that do not have profiles configured for them, any rules in enabled + // implementation guides will still be enforced. DisableFhirpathValidation bool `json:"disableFhirpathValidation,omitempty"` // DisableProfileValidation: Whether to disable profile validation for this - // FHIR store. Set this to true to disable checking incoming resources for - // conformance against structure definitions in this FHIR store. + // FHIR store. The default value is false. Set this to true to disable checking + // incoming resources for conformance against structure definitions in this + // FHIR store. DisableProfileValidation bool `json:"disableProfileValidation,omitempty"` // DisableReferenceTypeValidation: Whether to disable reference type validation - // for incoming resources. Set this to true to disable checking incoming - // resources for conformance against reference type requirement defined in the - // FHIR specification. This property only affects resource types that do not - // have profiles configured for them, any rules in enabled implementation - // guides will still be enforced. + // for incoming resources. The default value is false. Set this to true to + // disable checking incoming resources for conformance against reference type + // requirement defined in the FHIR specification. This property only affects + // resource types that do not have profiles configured for them, any rules in + // enabled implementation guides will still be enforced. DisableReferenceTypeValidation bool `json:"disableReferenceTypeValidation,omitempty"` // DisableRequiredFieldValidation: Whether to disable required fields - // validation for incoming resources. Set this to true to disable checking - // incoming resources for conformance against required fields requirement - // defined in the FHIR specification. This property only affects resource types - // that do not have profiles configured for them, any rules in enabled - // implementation guides will still be enforced. + // validation for incoming resources. The default value is false. Set this to + // true to disable checking incoming resources for conformance against required + // fields requirement defined in the FHIR specification. This property only + // affects resource types that do not have profiles configured for them, any + // rules in enabled implementation guides will still be enforced. DisableRequiredFieldValidation bool `json:"disableRequiredFieldValidation,omitempty"` // EnabledImplementationGuides: A list of implementation guide URLs in this // FHIR store that are used to configure the profiles to use for validation. diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index a292484c3ce..68eee2f31da 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -5672,7 +5672,7 @@ } } }, - "revision": "20240619", + "revision": "20240718", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -5929,6 +5929,25 @@ }, "type": "object" }, + "ApplyAdminConsentsErrorDetail": { + "description": "Contains the error details of the unsupported admin Consent resources for when the ApplyAdminConsents method fails to apply one or more Consent resources.", + "id": "ApplyAdminConsentsErrorDetail", + "properties": { + "consentErrors": { + "description": "The list of Consent resources that are unsupported or cannot be applied and the error associated with each of them.", + "items": { + "$ref": "ConsentErrors" + }, + "type": "array" + }, + "existingOperationId": { + "description": "The currently in progress non-validate-only ApplyAdminConsents operation ID if exist.", + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, "ApplyAdminConsentsRequest": { "description": "Request to apply the admin Consent resources for the specified FHIR store.", "id": "ApplyAdminConsentsRequest", @@ -6522,7 +6541,7 @@ "description": "Optional. Specifies how the server logs the consent-aware requests. If not specified, the `AccessDeterminationLogConfig.LogLevel.MINIMUM` option is used." }, "accessEnforced": { - "description": "Optional. If set to true, when accessing FHIR resources, the consent headers will be verified against consents given by patients. See the ConsentEnforcementVersion for the supported consent headers.", + "description": "Optional. The default value is false. If set to true, when accessing FHIR resources, the consent headers will be verified against consents given by patients. See the ConsentEnforcementVersion for the supported consent headers.", "type": "boolean" }, "consentHeaderHandling": { @@ -6551,6 +6570,21 @@ }, "type": "object" }, + "ConsentErrors": { + "description": "The Consent resource name and error.", + "id": "ConsentErrors", + "properties": { + "error": { + "$ref": "Status", + "description": "The error code and message." + }, + "name": { + "description": "The versioned name of the admin Consent resource, in the format `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR stores with `disable_resource_versioning=true`, the format is `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Consent/{resource_id}`.", + "type": "string" + } + }, + "type": "object" + }, "ConsentEvaluation": { "description": "The detailed evaluation of a particular Consent.", "id": "ConsentEvaluation", @@ -6773,7 +6807,7 @@ "description": "Configures de-identification of text wherever it is found in the source_dataset." }, "useRegionalDataProcessing": { - "description": "Ensures in-flight data remains in the region of origin during de-identification. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. If the deprecated DicomConfig or FhirConfig are used, then `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.", + "description": "Ensures in-flight data remains in the region of origin during de-identification. The default value is false. Using this option results in a significant reduction of throughput, and is not compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. If the deprecated DicomConfig or FhirConfig are used, then `LOCATION` must be excluded within TextConfig, and must also be excluded within ImageConfig if image redaction is required.", "type": "boolean" } }, @@ -7610,11 +7644,11 @@ "type": "string" }, "sendFullResource": { - "description": "Whether to send full FHIR resource to this Pub/Sub topic for Create and Update operation. Note that setting this to true does not guarantee that all resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full resource as a separate operation.", + "description": "Whether to send full FHIR resource to this Pub/Sub topic for Create and Update operation. The default value is false. Note that setting this to true does not guarantee that all resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full resource as a separate operation.", "type": "boolean" }, "sendPreviousResourceOnDelete": { - "description": "Whether to send full FHIR resource to this Pub/Sub topic for deleting FHIR resource. Note that setting this to true does not guarantee that all previous resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full previous resource as a separate operation.", + "description": "Whether to send full FHIR resource to this Pub/Sub topic for deleting FHIR resource. The default value is false. Note that setting this to true does not guarantee that all previous resources will be sent in the format of full FHIR resource. When a resource change is too large or during heavy traffic, only the resource name will be sent. Clients should always check the \"payloadType\" label from a Pub/Sub message to determine whether it needs to fetch the full previous resource as a separate operation.", "type": "boolean" } }, @@ -7654,7 +7688,7 @@ "description": "Optional. Specifies whether this store has consent enforcement. Not available for DSTU2 FHIR version due to absence of Consent resources." }, "defaultSearchHandlingStrict": { - "description": "If true, overrides the default search behavior for this FHIR store to `handling=strict` which returns an error for unrecognized search parameters. If false, uses the FHIR specification default `handling=lenient` which ignores unrecognized search parameters. The handling can always be changed from the default on an individual API call by setting the HTTP header `Prefer: handling=strict` or `Prefer: handling=lenient`.", + "description": "If true, overrides the default search behavior for this FHIR store to `handling=strict` which returns an error for unrecognized search parameters. If false, uses the FHIR specification default `handling=lenient` which ignores unrecognized search parameters. The handling can always be changed from the default on an individual API call by setting the HTTP header `Prefer: handling=strict` or `Prefer: handling=lenient`. Defaults to false.", "type": "boolean" }, "disableReferentialIntegrity": { @@ -7662,15 +7696,15 @@ "type": "boolean" }, "disableResourceVersioning": { - "description": "Immutable. Whether to disable resource versioning for this FHIR store. This field can not be changed after the creation of FHIR store. If set to false, which is the default behavior, all write operations cause historical versions to be recorded automatically. The historical versions can be fetched through the history APIs, but cannot be updated. If set to true, no historical versions are kept. The server sends errors for attempts to read the historical versions.", + "description": "Immutable. Whether to disable resource versioning for this FHIR store. This field can not be changed after the creation of FHIR store. If set to false, all write operations cause historical versions to be recorded automatically. The historical versions can be fetched through the history APIs, but cannot be updated. If set to true, no historical versions are kept. The server sends errors for attempts to read the historical versions. Defaults to false.", "type": "boolean" }, "enableHistoryModifications": { - "description": "Optional. Whether to allow ExecuteBundle to accept history bundles, and directly insert and overwrite historical resource versions into the FHIR store. If set to false, using history bundles fails with an error.", + "description": "Optional. Whether to allow ExecuteBundle to accept history bundles, and directly insert and overwrite historical resource versions into the FHIR store. If set to false, using history bundles fails with an error. Defaults to false.", "type": "boolean" }, "enableUpdateCreate": { - "description": "Whether this FHIR store has the [updateCreate capability](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). This determines if the client can use an Update operation to create a new resource with a client-specified ID. If false, all IDs are server-assigned through the Create operation and attempts to update a non-existent resource return errors. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources.", + "description": "Whether this FHIR store has the [updateCreate capability](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). This determines if the client can use an Update operation to create a new resource with a client-specified ID. If false, all IDs are server-assigned through the Create operation and attempts to update a non-existent resource return errors. It is strongly advised not to include or encode any sensitive data such as patient identifiers in client-specified resource IDs. Those IDs are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub notifications. Those IDs can also be contained in reference fields within other resources. Defaults to false.", "type": "boolean" }, "labels": { @@ -10227,19 +10261,19 @@ "id": "ValidationConfig", "properties": { "disableFhirpathValidation": { - "description": "Whether to disable FHIRPath validation for incoming resources. Set this to true to disable checking incoming resources for conformance against FHIRPath requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable FHIRPath validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against FHIRPath requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "disableProfileValidation": { - "description": "Whether to disable profile validation for this FHIR store. Set this to true to disable checking incoming resources for conformance against StructureDefinitions in this FHIR store.", + "description": "Whether to disable profile validation for this FHIR store. The default value is false. Set this to true to disable checking incoming resources for conformance against StructureDefinitions in this FHIR store.", "type": "boolean" }, "disableReferenceTypeValidation": { - "description": "Whether to disable reference type validation for incoming resources. Set this to true to disable checking incoming resources for conformance against reference type requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable reference type validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against reference type requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "disableRequiredFieldValidation": { - "description": "Whether to disable required fields validation for incoming resources. Set this to true to disable checking incoming resources for conformance against required fields requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", + "description": "Whether to disable required fields validation for incoming resources. The default value is false. Set this to true to disable checking incoming resources for conformance against required fields requirement defined in the FHIR specification. This property only affects resource types that do not have profiles configured for them, any rules in enabled implementation guides will still be enforced.", "type": "boolean" }, "enabledImplementationGuides": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index b27979ee44f..25440d6e94c 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -862,6 +862,34 @@ func (s AnnotationStore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ApplyAdminConsentsErrorDetail: Contains the error details of the unsupported +// admin Consent resources for when the ApplyAdminConsents method fails to +// apply one or more Consent resources. +type ApplyAdminConsentsErrorDetail struct { + // ConsentErrors: The list of Consent resources that are unsupported or cannot + // be applied and the error associated with each of them. + ConsentErrors []*ConsentErrors `json:"consentErrors,omitempty"` + // ExistingOperationId: The currently in progress non-validate-only + // ApplyAdminConsents operation ID if exist. + ExistingOperationId uint64 `json:"existingOperationId,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ConsentErrors") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConsentErrors") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ApplyAdminConsentsErrorDetail) MarshalJSON() ([]byte, error) { + type NoMethod ApplyAdminConsentsErrorDetail + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ApplyAdminConsentsRequest: Request to apply the admin Consent resources for // the specified FHIR store. type ApplyAdminConsentsRequest struct { @@ -1763,9 +1791,10 @@ type ConsentConfig struct { // consent-aware requests. If not specified, the // `AccessDeterminationLogConfig.LogLevel.MINIMUM` option is used. AccessDeterminationLogConfig *AccessDeterminationLogConfig `json:"accessDeterminationLogConfig,omitempty"` - // AccessEnforced: Optional. If set to true, when accessing FHIR resources, the - // consent headers will be verified against consents given by patients. See the - // ConsentEnforcementVersion for the supported consent headers. + // AccessEnforced: Optional. The default value is false. If set to true, when + // accessing FHIR resources, the consent headers will be verified against + // consents given by patients. See the ConsentEnforcementVersion for the + // supported consent headers. AccessEnforced bool `json:"accessEnforced,omitempty"` // ConsentHeaderHandling: Optional. Different options to configure the // behaviour of the server when handling the `X-Consent-Scope` header. @@ -1809,6 +1838,35 @@ func (s ConsentConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ConsentErrors: The Consent resource name and error. +type ConsentErrors struct { + // Error: The error code and message. + Error *Status `json:"error,omitempty"` + // Name: The versioned name of the admin Consent resource, in the format + // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/ + // {fhir_store_id}/fhir/Consent/{resource_id}/_history/{version_id}`. For FHIR + // stores with `disable_resource_versioning=true`, the format is + // `projects/{project_id}/locations/{location}/datasets/{dataset_id}/fhirStores/ + // {fhir_store_id}/fhir/Consent/{resource_id}`. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ConsentErrors) MarshalJSON() ([]byte, error) { + type NoMethod ConsentErrors + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ConsentEvaluation: The detailed evaluation of a particular Consent. type ConsentEvaluation struct { // EvaluationResult: The evaluation result. @@ -2158,11 +2216,12 @@ type DeidentifyConfig struct { // source_dataset. Text *TextConfig `json:"text,omitempty"` // UseRegionalDataProcessing: Ensures in-flight data remains in the region of - // origin during de-identification. Using this option results in a significant - // reduction of throughput, and is not compatible with `LOCATION` or - // `ORGANIZATION_NAME` infoTypes. If the deprecated DicomConfig or FhirConfig - // are used, then `LOCATION` must be excluded within TextConfig, and must also - // be excluded within ImageConfig if image redaction is required. + // origin during de-identification. The default value is false. Using this + // option results in a significant reduction of throughput, and is not + // compatible with `LOCATION` or `ORGANIZATION_NAME` infoTypes. If the + // deprecated DicomConfig or FhirConfig are used, then `LOCATION` must be + // excluded within TextConfig, and must also be excluded within ImageConfig if + // image redaction is required. UseRegionalDataProcessing bool `json:"useRegionalDataProcessing,omitempty"` // ForceSendFields is a list of field names (e.g. "Annotation") to // unconditionally include in API requests. By default, fields with empty or @@ -3463,20 +3522,21 @@ type FhirNotificationConfig struct { // (https://cloud.google.com/healthcare-api/docs/how-tos/logging). PubsubTopic string `json:"pubsubTopic,omitempty"` // SendFullResource: Whether to send full FHIR resource to this Pub/Sub topic - // for Create and Update operation. Note that setting this to true does not - // guarantee that all resources will be sent in the format of full FHIR - // resource. When a resource change is too large or during heavy traffic, only - // the resource name will be sent. Clients should always check the - // "payloadType" label from a Pub/Sub message to determine whether it needs to - // fetch the full resource as a separate operation. + // for Create and Update operation. The default value is false. Note that + // setting this to true does not guarantee that all resources will be sent in + // the format of full FHIR resource. When a resource change is too large or + // during heavy traffic, only the resource name will be sent. Clients should + // always check the "payloadType" label from a Pub/Sub message to determine + // whether it needs to fetch the full resource as a separate operation. SendFullResource bool `json:"sendFullResource,omitempty"` // SendPreviousResourceOnDelete: Whether to send full FHIR resource to this - // Pub/Sub topic for deleting FHIR resource. Note that setting this to true - // does not guarantee that all previous resources will be sent in the format of - // full FHIR resource. When a resource change is too large or during heavy - // traffic, only the resource name will be sent. Clients should always check - // the "payloadType" label from a Pub/Sub message to determine whether it needs - // to fetch the full previous resource as a separate operation. + // Pub/Sub topic for deleting FHIR resource. The default value is false. Note + // that setting this to true does not guarantee that all previous resources + // will be sent in the format of full FHIR resource. When a resource change is + // too large or during heavy traffic, only the resource name will be sent. + // Clients should always check the "payloadType" label from a Pub/Sub message + // to determine whether it needs to fetch the full previous resource as a + // separate operation. SendPreviousResourceOnDelete bool `json:"sendPreviousResourceOnDelete,omitempty"` // ForceSendFields is a list of field names (e.g. "PubsubTopic") to // unconditionally include in API requests. By default, fields with empty or @@ -3552,7 +3612,7 @@ type FhirStore struct { // default `handling=lenient` which ignores unrecognized search parameters. The // handling can always be changed from the default on an individual API call by // setting the HTTP header `Prefer: handling=strict` or `Prefer: - // handling=lenient`. + // handling=lenient`. Defaults to false. DefaultSearchHandlingStrict bool `json:"defaultSearchHandlingStrict,omitempty"` // DisableReferentialIntegrity: Immutable. Whether to disable referential // integrity in this FHIR store. This field is immutable after FHIR store @@ -3565,16 +3625,16 @@ type FhirStore struct { DisableReferentialIntegrity bool `json:"disableReferentialIntegrity,omitempty"` // DisableResourceVersioning: Immutable. Whether to disable resource versioning // for this FHIR store. This field can not be changed after the creation of - // FHIR store. If set to false, which is the default behavior, all write - // operations cause historical versions to be recorded automatically. The - // historical versions can be fetched through the history APIs, but cannot be - // updated. If set to true, no historical versions are kept. The server sends - // errors for attempts to read the historical versions. + // FHIR store. If set to false, all write operations cause historical versions + // to be recorded automatically. The historical versions can be fetched through + // the history APIs, but cannot be updated. If set to true, no historical + // versions are kept. The server sends errors for attempts to read the + // historical versions. Defaults to false. DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"` // EnableHistoryModifications: Optional. Whether to allow ExecuteBundle to // accept history bundles, and directly insert and overwrite historical // resource versions into the FHIR store. If set to false, using history - // bundles fails with an error. + // bundles fails with an error. Defaults to false. EnableHistoryModifications bool `json:"enableHistoryModifications,omitempty"` // EnableUpdateCreate: Whether this FHIR store has the updateCreate capability // (https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.rest.resource.updateCreate). @@ -3585,7 +3645,7 @@ type FhirStore struct { // data such as patient identifiers in client-specified resource IDs. Those IDs // are part of the FHIR resource path recorded in Cloud audit logs and Pub/Sub // notifications. Those IDs can also be contained in reference fields within - // other resources. + // other resources. Defaults to false. EnableUpdateCreate bool `json:"enableUpdateCreate,omitempty"` // Labels: User-supplied key-value pairs used to organize FHIR stores. Label // keys must be between 1 and 63 characters long, have a UTF-8 encoding of @@ -7550,29 +7610,30 @@ func (s UserDataMapping) MarshalJSON() ([]byte, error) { // validation. type ValidationConfig struct { // DisableFhirpathValidation: Whether to disable FHIRPath validation for - // incoming resources. Set this to true to disable checking incoming resources - // for conformance against FHIRPath requirement defined in the FHIR - // specification. This property only affects resource types that do not have - // profiles configured for them, any rules in enabled implementation guides - // will still be enforced. + // incoming resources. The default value is false. Set this to true to disable + // checking incoming resources for conformance against FHIRPath requirement + // defined in the FHIR specification. This property only affects resource types + // that do not have profiles configured for them, any rules in enabled + // implementation guides will still be enforced. DisableFhirpathValidation bool `json:"disableFhirpathValidation,omitempty"` // DisableProfileValidation: Whether to disable profile validation for this - // FHIR store. Set this to true to disable checking incoming resources for - // conformance against StructureDefinitions in this FHIR store. + // FHIR store. The default value is false. Set this to true to disable checking + // incoming resources for conformance against StructureDefinitions in this FHIR + // store. DisableProfileValidation bool `json:"disableProfileValidation,omitempty"` // DisableReferenceTypeValidation: Whether to disable reference type validation - // for incoming resources. Set this to true to disable checking incoming - // resources for conformance against reference type requirement defined in the - // FHIR specification. This property only affects resource types that do not - // have profiles configured for them, any rules in enabled implementation - // guides will still be enforced. + // for incoming resources. The default value is false. Set this to true to + // disable checking incoming resources for conformance against reference type + // requirement defined in the FHIR specification. This property only affects + // resource types that do not have profiles configured for them, any rules in + // enabled implementation guides will still be enforced. DisableReferenceTypeValidation bool `json:"disableReferenceTypeValidation,omitempty"` // DisableRequiredFieldValidation: Whether to disable required fields - // validation for incoming resources. Set this to true to disable checking - // incoming resources for conformance against required fields requirement - // defined in the FHIR specification. This property only affects resource types - // that do not have profiles configured for them, any rules in enabled - // implementation guides will still be enforced. + // validation for incoming resources. The default value is false. Set this to + // true to disable checking incoming resources for conformance against required + // fields requirement defined in the FHIR specification. This property only + // affects resource types that do not have profiles configured for them, any + // rules in enabled implementation guides will still be enforced. DisableRequiredFieldValidation bool `json:"disableRequiredFieldValidation,omitempty"` // EnabledImplementationGuides: A list of ImplementationGuide URLs in this FHIR // store that are used to configure the profiles to use for validation. For diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index e01dfa655c9..777c889cc56 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -988,7 +988,7 @@ ] }, "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed.", + "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](/iam/quotas#limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", "flatPath": "v1/organizations/{organizationsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.organizations.roles.delete", @@ -2288,7 +2288,7 @@ ] }, "delete": { - "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed.", + "description": "Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are not changed, but they have no effect. * By default, the response from ListRoles does not include the custom role. A deleted custom role still counts toward the [custom role limit](/iam/quotas#limits) until it is permanently deleted. You have 7 days to undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding is permanently removed. * The custom role no longer counts toward your custom role limit.", "flatPath": "v1/projects/{projectsId}/roles/{rolesId}", "httpMethod": "DELETE", "id": "iam.projects.roles.delete", @@ -3056,34 +3056,6 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "patch": { - "description": "Patches a ServiceAccountKey.", - "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys/{keysId}:patch", - "httpMethod": "POST", - "id": "iam.projects.serviceAccounts.keys.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.", - "location": "path", - "pattern": "^projects/[^/]+/serviceAccounts/[^/]+/keys/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}:patch", - "request": { - "$ref": "PatchServiceAccountKeyRequest" - }, - "response": { - "$ref": "ServiceAccountKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "upload": { "description": "Uploads the public key portion of a key pair that you manage, and associates the public key with a ServiceAccount. After you upload the public key, you can use the private key from the key pair as a service account key.", "flatPath": "v1/projects/{projectsId}/serviceAccounts/{serviceAccountsId}/keys:upload", @@ -3216,7 +3188,7 @@ } } }, - "revision": "20240617", + "revision": "20240722", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AccessRestrictions": { @@ -4271,22 +4243,6 @@ }, "type": "object" }, - "PatchServiceAccountKeyRequest": { - "description": "The service account key patch request.", - "id": "PatchServiceAccountKeyRequest", - "properties": { - "serviceAccountKey": { - "$ref": "ServiceAccountKey", - "description": "Required. The service account key to update." - }, - "updateMask": { - "description": "Required. The update mask to apply to the service account key. Only the following fields are eligible for patching: - contact - description", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, "PatchServiceAccountRequest": { "description": "The service account patch request. You can patch only the `display_name` and `description` fields. You must use the `update_mask` field to specify which of these fields you want to patch. Only the fields specified in the request are guaranteed to be returned in the response. Other fields may be empty in the response.", "id": "PatchServiceAccountRequest", @@ -4691,19 +4647,6 @@ "description": "Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key's lifetime. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.", "id": "ServiceAccountKey", "properties": { - "contact": { - "description": "Optional. A user provided email address as the point of contact for this service account key. Must be an email address. Limit 64 characters.", - "type": "string" - }, - "creator": { - "description": "Output only. The cloud identity that created this service account key. Populated automatically when the key is created and not editable by the user.", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. A user provided description of this service account key.", - "type": "string" - }, "disableReason": { "description": "Output only. optional. If the key is disabled, it may have a DisableReason describing why it was disabled.", "enum": [ diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 2536d3a572e..8e1cdbb10dc 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -2156,31 +2156,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PatchServiceAccountKeyRequest: The service account key patch request. -type PatchServiceAccountKeyRequest struct { - // ServiceAccountKey: Required. The service account key to update. - ServiceAccountKey *ServiceAccountKey `json:"serviceAccountKey,omitempty"` - // UpdateMask: Required. The update mask to apply to the service account key. - // Only the following fields are eligible for patching: - contact - description - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "ServiceAccountKey") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ServiceAccountKey") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PatchServiceAccountKeyRequest) MarshalJSON() ([]byte, error) { - type NoMethod PatchServiceAccountKeyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // PatchServiceAccountRequest: The service account patch request. You can patch // only the `display_name` and `description` fields. You must use the // `update_mask` field to specify which of these fields you want to patch. Only @@ -2784,16 +2759,6 @@ func (s ServiceAccount) MarshalJSON() ([]byte, error) { // Public keys for all service accounts are also published at the OAuth2 // Service Account API. type ServiceAccountKey struct { - // Contact: Optional. A user provided email address as the point of contact for - // this service account key. Must be an email address. Limit 64 characters. - Contact string `json:"contact,omitempty"` - // Creator: Output only. The cloud identity that created this service account - // key. Populated automatically when the key is created and not editable by the - // user. - Creator string `json:"creator,omitempty"` - // Description: Optional. A user provided description of this service account - // key. - Description string `json:"description,omitempty"` // DisableReason: Output only. optional. If the key is disabled, it may have a // DisableReason describing why it was disabled. // @@ -2870,13 +2835,13 @@ type ServiceAccountKey struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Contact") 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. "DisableReason") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Contact") to include in API + // NullFields is a list of field names (e.g. "DisableReason") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -6967,10 +6932,13 @@ type OrganizationsRolesDeleteCall struct { // changes occur immediately: * You cannot bind a principal to the custom role // in an IAM Policy. * Existing bindings to the custom role are not changed, // but they have no effect. * By default, the response from ListRoles does not -// include the custom role. You have 7 days to undelete the custom role. After -// 7 days, the following changes occur: * The custom role is permanently -// deleted and cannot be recovered. * If an IAM policy contains a binding to -// the custom role, the binding is permanently removed. +// include the custom role. A deleted custom role still counts toward the +// custom role limit (/iam/quotas#limits) until it is permanently deleted. You +// have 7 days to undelete the custom role. After 7 days, the following changes +// occur: * The custom role is permanently deleted and cannot be recovered. * +// If an IAM policy contains a binding to the custom role, the binding is +// permanently removed. * The custom role no longer counts toward your custom +// role limit. // // - name: The `name` parameter's value depends on the target resource for the // request, namely projects @@ -11739,10 +11707,13 @@ type ProjectsRolesDeleteCall struct { // changes occur immediately: * You cannot bind a principal to the custom role // in an IAM Policy. * Existing bindings to the custom role are not changed, // but they have no effect. * By default, the response from ListRoles does not -// include the custom role. You have 7 days to undelete the custom role. After -// 7 days, the following changes occur: * The custom role is permanently -// deleted and cannot be recovered. * If an IAM policy contains a binding to -// the custom role, the binding is permanently removed. +// include the custom role. A deleted custom role still counts toward the +// custom role limit (/iam/quotas#limits) until it is permanently deleted. You +// have 7 days to undelete the custom role. After 7 days, the following changes +// occur: * The custom role is permanently deleted and cannot be recovered. * +// If an IAM policy contains a binding to the custom role, the binding is +// permanently removed. * The custom role no longer counts toward your custom +// role limit. // // - name: The `name` parameter's value depends on the target resource for the // request, namely projects @@ -14793,109 +14764,6 @@ func (c *ProjectsServiceAccountsKeysListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsServiceAccountsKeysPatchCall struct { - s *Service - name string - patchserviceaccountkeyrequest *PatchServiceAccountKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches a ServiceAccountKey. -// -// - name: The resource name of the service account key in the following format -// `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. -func (r *ProjectsServiceAccountsKeysService) Patch(name string, patchserviceaccountkeyrequest *PatchServiceAccountKeyRequest) *ProjectsServiceAccountsKeysPatchCall { - c := &ProjectsServiceAccountsKeysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.patchserviceaccountkeyrequest = patchserviceaccountkeyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsServiceAccountsKeysPatchCall) Fields(s ...googleapi.Field) *ProjectsServiceAccountsKeysPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsServiceAccountsKeysPatchCall) Context(ctx context.Context) *ProjectsServiceAccountsKeysPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsServiceAccountsKeysPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsServiceAccountsKeysPatchCall) 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.patchserviceaccountkeyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:patch") - 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 "iam.projects.serviceAccounts.keys.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ServiceAccountKey.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsServiceAccountsKeysPatchCall) Do(opts ...googleapi.CallOption) (*ServiceAccountKey, 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 := &ServiceAccountKey{ - 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 ProjectsServiceAccountsKeysUploadCall struct { s *Service name string diff --git a/language/v2/language-api.json b/language/v2/language-api.json index 92e7548782d..9d0f1e14ac7 100644 --- a/language/v2/language-api.json +++ b/language/v2/language-api.json @@ -208,7 +208,7 @@ } } }, - "revision": "20240220", + "revision": "20240713", "rootUrl": "https://language.googleapis.com/", "schemas": { "AnalyzeEntitiesRequest": { @@ -577,6 +577,7 @@ "A2_ULTRAGPU_4G", "A2_ULTRAGPU_8G", "A3_HIGHGPU_8G", + "A3_MEGAGPU_8G", "E2_STANDARD_2", "E2_STANDARD_4", "E2_STANDARD_8", @@ -862,6 +863,7 @@ "", "", "", + "", "" ], "type": "string" @@ -1108,6 +1110,7 @@ "A2_ULTRAGPU_4G", "A2_ULTRAGPU_8G", "A3_HIGHGPU_8G", + "A3_MEGAGPU_8G", "E2_STANDARD_2", "E2_STANDARD_4", "E2_STANDARD_8", @@ -1393,6 +1396,7 @@ "", "", "", + "", "" ], "type": "string" @@ -1525,6 +1529,7 @@ "A2_ULTRAGPU_4G", "A2_ULTRAGPU_8G", "A3_HIGHGPU_8G", + "A3_MEGAGPU_8G", "E2_STANDARD_2", "E2_STANDARD_4", "E2_STANDARD_8", @@ -1810,6 +1815,7 @@ "", "", "", + "", "" ], "type": "string" @@ -2968,6 +2974,7 @@ "NVIDIA_A100_80GB", "NVIDIA_L4", "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -2984,6 +2991,7 @@ "Nvidia A100 80GB GPU.", "Nvidia L4 GPU.", "Nvidia H100 80Gb GPU.", + "Nvidia H100 80Gb GPU.", "TPU v2 (JellyFish).", "TPU v3 (DragonFish).", "TPU_v4 (PufferFish).", diff --git a/language/v2/language-gen.go b/language/v2/language-gen.go index 178d980a746..39519166f6a 100644 --- a/language/v2/language-gen.go +++ b/language/v2/language-gen.go @@ -696,6 +696,7 @@ type CpuMetric struct { // "A2_ULTRAGPU_4G" // "A2_ULTRAGPU_8G" // "A3_HIGHGPU_8G" + // "A3_MEGAGPU_8G" // "E2_STANDARD_2" // "E2_STANDARD_4" // "E2_STANDARD_8" @@ -1092,6 +1093,7 @@ type GpuMetric struct { // "A2_ULTRAGPU_4G" // "A2_ULTRAGPU_8G" // "A3_HIGHGPU_8G" + // "A3_MEGAGPU_8G" // "E2_STANDARD_2" // "E2_STANDARD_4" // "E2_STANDARD_8" @@ -1368,6 +1370,7 @@ type RamMetric struct { // "A2_ULTRAGPU_4G" // "A2_ULTRAGPU_8G" // "A3_HIGHGPU_8G" + // "A3_MEGAGPU_8G" // "E2_STANDARD_2" // "E2_STANDARD_4" // "E2_STANDARD_8" @@ -2981,6 +2984,7 @@ type XPSImageModelServingSpecModelThroughputEstimation struct { // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. // "NVIDIA_L4" - Nvidia L4 GPU. // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. + // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 80Gb GPU. // "TPU_V2" - TPU v2 (JellyFish). // "TPU_V3" - TPU v3 (DragonFish). // "TPU_V4_POD" - TPU_v4 (PufferFish). diff --git a/manufacturers/v1/manufacturers-api.json b/manufacturers/v1/manufacturers-api.json index d9a107b5192..0432a4c3160 100644 --- a/manufacturers/v1/manufacturers-api.json +++ b/manufacturers/v1/manufacturers-api.json @@ -416,7 +416,7 @@ } } }, - "revision": "20231109", + "revision": "20240716", "rootUrl": "https://manufacturers.googleapis.com/", "schemas": { "Attributes": { @@ -892,6 +892,14 @@ "description": "Product issue.", "id": "Issue", "properties": { + "applicableCountries": { + "description": "Output only. List of country codes (ISO 3166-1 alpha-2) where issue applies to the manufacturer product.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "attribute": { "description": "If present, the attribute that triggered the issue. For more information about attributes, see https://support.google.com/manufacturers/answer/6124116.", "type": "string" diff --git a/manufacturers/v1/manufacturers-gen.go b/manufacturers/v1/manufacturers-gen.go index 0be45e93934..5ecf37c398b 100644 --- a/manufacturers/v1/manufacturers-gen.go +++ b/manufacturers/v1/manufacturers-gen.go @@ -672,6 +672,9 @@ func (s Image) MarshalJSON() ([]byte, error) { // Issue: Product issue. type Issue struct { + // ApplicableCountries: Output only. List of country codes (ISO 3166-1 alpha-2) + // where issue applies to the manufacturer product. + ApplicableCountries []string `json:"applicableCountries,omitempty"` // Attribute: If present, the attribute that triggered the issue. For more // information about attributes, see // https://support.google.com/manufacturers/answer/6124116. @@ -709,15 +712,15 @@ type Issue struct { // Type: The server-generated type of the issue, for example, // “INCORRECT_TEXT_FORMATTING”, “IMAGE_NOT_SERVEABLE”, etc. Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attribute") to + // 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. "Attribute") 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. "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:"-"` } diff --git a/meet/v2/meet-api.json b/meet/v2/meet-api.json index 968af8335d3..a99eab7b6ca 100644 --- a/meet/v2/meet-api.json +++ b/meet/v2/meet-api.json @@ -543,7 +543,7 @@ ] }, "endActiveConference": { - "description": "Ends an active conference (if there's one).", + "description": "Ends an active conference (if there's one). For an example, see [End active conference](https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference).", "flatPath": "v2/spaces/{spacesId}:endActiveConference", "httpMethod": "POST", "id": "meet.spaces.endActiveConference", @@ -552,7 +552,7 @@ ], "parameters": { "name": { - "description": "Required. Resource name of the space.", + "description": "Required. Resource name of the space. Format: `spaces/{space}`. `{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).", "location": "path", "pattern": "^spaces/[^/]+$", "required": true, @@ -571,7 +571,7 @@ ] }, "get": { - "description": "Gets a space by `space_id` or `meeting_code`.", + "description": "Gets details about a meeting space. For an example, see [Get a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space).", "flatPath": "v2/spaces/{spacesId}", "httpMethod": "GET", "id": "meet.spaces.get", @@ -580,7 +580,7 @@ ], "parameters": { "name": { - "description": "Required. Resource name of the space.", + "description": "Required. Resource name of the space. Format: `spaces/{space}` or `spaces/{meetingCode}`. `{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. `{meetingCode}` is an alias for the space. It's a typeable, unique character string and is non-case sensitive. For example, `abc-mnop-xyz`. The maximum length is 128 characters. A `meetingCode` shouldn't be stored long term as it can become dissociated from a meeting space and can be reused for different meeting spaces in the future. Generally, a `meetingCode` expires 365 days after last use. For more information, see [Learn about meeting codes in Google Meet](https://support.google.com/meet/answer/10710509). For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).", "location": "path", "pattern": "^spaces/[^/]+$", "required": true, @@ -597,7 +597,7 @@ ] }, "patch": { - "description": "Updates a space.", + "description": "Updates details about a meeting space. For an example, see [Update a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space).", "flatPath": "v2/spaces/{spacesId}", "httpMethod": "PATCH", "id": "meet.spaces.patch", @@ -606,7 +606,7 @@ ], "parameters": { "name": { - "description": "Immutable. Resource name of the space. Format: `spaces/{space}`", + "description": "Immutable. Resource name of the space. Format: `spaces/{space}`. `{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).", "location": "path", "pattern": "^spaces/[^/]+$", "required": true, @@ -633,7 +633,7 @@ } } }, - "revision": "20240626", + "revision": "20240716", "rootUrl": "https://meet.googleapis.com/", "schemas": { "ActiveConference": { @@ -1000,17 +1000,17 @@ "description": "Configuration pertaining to the meeting space." }, "meetingCode": { - "description": "Output only. Type friendly code to join the meeting. Format: `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 characters. Can only be used as an alias of the space ID to get the space.", + "description": "Output only. Type friendly unique string used to join the meeting. Format: `[a-z]+-[a-z]+-[a-z]+`. For example, `abc-mnop-xyz`. The maximum length is 128 characters. Can only be used as an alias of the space name to get the space.", "readOnly": true, "type": "string" }, "meetingUri": { - "description": "Output only. URI used to join meetings, such as `https://meet.google.com/abc-mnop-xyz`.", + "description": "Output only. URI used to join meetings consisting of `https://meet.google.com/` followed by the `meeting_code`. For example, `https://meet.google.com/abc-mnop-xyz`.", "readOnly": true, "type": "string" }, "name": { - "description": "Immutable. Resource name of the space. Format: `spaces/{space}`", + "description": "Immutable. Resource name of the space. Format: `spaces/{space}`. `{space}` is the resource identifier for the space. It's a unique, server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. For more information, see [How Meet identifies a meeting space](https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space).", "type": "string" } }, diff --git a/meet/v2/meet-gen.go b/meet/v2/meet-gen.go index c7066b23742..ef5a9f73e80 100644 --- a/meet/v2/meet-gen.go +++ b/meet/v2/meet-gen.go @@ -759,14 +759,20 @@ type Space struct { ActiveConference *ActiveConference `json:"activeConference,omitempty"` // Config: Configuration pertaining to the meeting space. Config *SpaceConfig `json:"config,omitempty"` - // MeetingCode: Output only. Type friendly code to join the meeting. Format: - // `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 - // characters. Can only be used as an alias of the space ID to get the space. + // MeetingCode: Output only. Type friendly unique string used to join the + // meeting. Format: `[a-z]+-[a-z]+-[a-z]+`. For example, `abc-mnop-xyz`. The + // maximum length is 128 characters. Can only be used as an alias of the space + // name to get the space. MeetingCode string `json:"meetingCode,omitempty"` - // MeetingUri: Output only. URI used to join meetings, such as + // MeetingUri: Output only. URI used to join meetings consisting of + // `https://meet.google.com/` followed by the `meeting_code`. For example, // `https://meet.google.com/abc-mnop-xyz`. MeetingUri string `json:"meetingUri,omitempty"` - // Name: Immutable. Resource name of the space. Format: `spaces/{space}` + // Name: Immutable. Resource name of the space. Format: `spaces/{space}`. + // `{space}` is the resource identifier for the space. It's a unique, + // server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. For + // more information, see How Meet identifies a meeting space + // (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space). Name string `json:"name,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -2581,19 +2587,25 @@ func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error) { type SpacesEndActiveConferenceCall struct { s *Service - name string + nameid string endactiveconferencerequest *EndActiveConferenceRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// EndActiveConference: Ends an active conference (if there's one). +// EndActiveConference: Ends an active conference (if there's one). For an +// example, see End active conference +// (https://developers.google.com/meet/api/guides/meeting-spaces#end-active-conference). // -// - name: Resource name of the space. -func (r *SpacesService) EndActiveConference(name string, endactiveconferencerequest *EndActiveConferenceRequest) *SpacesEndActiveConferenceCall { +// - name: Resource name of the space. Format: `spaces/{space}`. `{space}` is +// the resource identifier for the space. It's a unique, server-generated ID +// and is case sensitive. For example, `jQCFfuBOdN5z`. For more information, +// see How Meet identifies a meeting space +// (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space). +func (r *SpacesService) EndActiveConference(nameid string, endactiveconferencerequest *EndActiveConferenceRequest) *SpacesEndActiveConferenceCall { c := &SpacesEndActiveConferenceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.endactiveconferencerequest = endactiveconferencerequest return c } @@ -2638,7 +2650,7 @@ func (c *SpacesEndActiveConferenceCall) doRequest(alt string) (*http.Response, e } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2682,19 +2694,33 @@ func (c *SpacesEndActiveConferenceCall) Do(opts ...googleapi.CallOption) (*Empty type SpacesGetCall struct { s *Service - name string + nameid string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a space by `space_id` or `meeting_code`. +// Get: Gets details about a meeting space. For an example, see Get a meeting +// space +// (https://developers.google.com/meet/api/guides/meeting-spaces#get-meeting-space). // -// - name: Resource name of the space. -func (r *SpacesService) Get(name string) *SpacesGetCall { +// - name: Resource name of the space. Format: `spaces/{space}` or +// `spaces/{meetingCode}`. `{space}` is the resource identifier for the +// space. It's a unique, server-generated ID and is case sensitive. For +// example, `jQCFfuBOdN5z`. `{meetingCode}` is an alias for the space. It's a +// typeable, unique character string and is non-case sensitive. For example, +// `abc-mnop-xyz`. The maximum length is 128 characters. A `meetingCode` +// shouldn't be stored long term as it can become dissociated from a meeting +// space and can be reused for different meeting spaces in the future. +// Generally, a `meetingCode` expires 365 days after last use. For more +// information, see Learn about meeting codes in Google Meet +// (https://support.google.com/meet/answer/10710509). For more information, +// see How Meet identifies a meeting space +// (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space). +func (r *SpacesService) Get(nameid string) *SpacesGetCall { c := &SpacesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid return c } @@ -2745,7 +2771,7 @@ func (c *SpacesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -2789,19 +2815,25 @@ func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error) { type SpacesPatchCall struct { s *Service - name string + nameid string space *Space urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates a space. +// Patch: Updates details about a meeting space. For an example, see Update a +// meeting space +// (https://developers.google.com/meet/api/guides/meeting-spaces#update-meeting-space). // -// - name: Immutable. Resource name of the space. Format: `spaces/{space}`. -func (r *SpacesService) Patch(name string, space *Space) *SpacesPatchCall { +// - name: Immutable. Resource name of the space. Format: `spaces/{space}`. +// `{space}` is the resource identifier for the space. It's a unique, +// server-generated ID and is case sensitive. For example, `jQCFfuBOdN5z`. +// For more information, see How Meet identifies a meeting space +// (https://developers.google.com/meet/api/guides/meeting-spaces#identify-meeting-space). +func (r *SpacesService) Patch(nameid string, space *Space) *SpacesPatchCall { c := &SpacesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name + c.nameid = nameid c.space = space return c } @@ -2855,7 +2887,7 @@ func (c *SpacesPatchCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "name": c.nameid, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index cb730fb0051..8ab1365acd6 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -1153,7 +1153,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the terms of service version. Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}`", + "description": "Required. The resource name of the terms of service version. Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` The identifier format is: `{TermsOfServiceKind}-{country}`", "location": "path", "pattern": "^accounts/[^/]+/termsOfServiceAgreementStates/[^/]+$", "required": true, @@ -1453,7 +1453,7 @@ } } }, - "revision": "20240709", + "revision": "20240719", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AcceptTermsOfService": { @@ -3358,7 +3358,7 @@ "description": "The accepted terms of service of this kind and for the associated region_code" }, "name": { - "description": "Identifier. The resource name of the terms of service version. Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}`", + "description": "Identifier. The resource name of the terms of service version. Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` The identifier format is: `{TermsOfServiceKind}-{country}` For example, an identifier could be: `MERCHANT_CENTER-US`", "type": "string" }, "regionCode": { diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index fc5fd0e6358..d846589c1fd 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -2812,7 +2812,9 @@ type TermsOfServiceAgreementState struct { // region_code Accepted *Accepted `json:"accepted,omitempty"` // Name: Identifier. The resource name of the terms of service version. Format: - // `accounts/{account}/termsOfServiceAgreementState/{identifier}` + // `accounts/{account}/termsOfServiceAgreementState/{identifier}` The + // identifier format is: `{TermsOfServiceKind}-{country}` For example, an + // identifier could be: `MERCHANT_CENTER-US` Name string `json:"name,omitempty"` // RegionCode: Region code as defined by https://cldr.unicode.org/. This is the // country the current state applies to. @@ -7040,7 +7042,8 @@ type AccountsTermsOfServiceAgreementStatesGetCall struct { // Get: Returns the state of a terms of service agreement. // // - name: The resource name of the terms of service version. Format: -// `accounts/{account}/termsOfServiceAgreementState/{identifier}`. +// `accounts/{account}/termsOfServiceAgreementState/{identifier}` The +// identifier format is: `{TermsOfServiceKind}-{country}`. func (r *AccountsTermsOfServiceAgreementStatesService) Get(nameid string) *AccountsTermsOfServiceAgreementStatesGetCall { c := &AccountsTermsOfServiceAgreementStatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.nameid = nameid diff --git a/merchantapi/datasources_v1beta/merchantapi-api.json b/merchantapi/datasources_v1beta/merchantapi-api.json index 1f046b94202..ce6398bcfaa 100644 --- a/merchantapi/datasources_v1beta/merchantapi-api.json +++ b/merchantapi/datasources_v1beta/merchantapi-api.json @@ -290,7 +290,7 @@ } } }, - "revision": "20240613", + "revision": "20240719", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "DataSource": { @@ -526,7 +526,7 @@ "Not specified.", "Online product.", "Local product.", - "Unified data source for both local and online products." + "Unified data source for both local and online products. Note: Products management through the API is not possible for this channel." ], "type": "string" }, diff --git a/merchantapi/datasources_v1beta/merchantapi-gen.go b/merchantapi/datasources_v1beta/merchantapi-gen.go index ca658d2d266..6d51a26ecff 100644 --- a/merchantapi/datasources_v1beta/merchantapi-gen.go +++ b/merchantapi/datasources_v1beta/merchantapi-gen.go @@ -427,7 +427,8 @@ type PrimaryProductDataSource struct { // "CHANNEL_UNSPECIFIED" - Not specified. // "ONLINE_PRODUCTS" - Online product. // "LOCAL_PRODUCTS" - Local product. - // "PRODUCTS" - Unified data source for both local and online products. + // "PRODUCTS" - Unified data source for both local and online products. Note: + // Products management through the API is not possible for this channel. Channel string `json:"channel,omitempty"` // ContentLanguage: Optional. Immutable. The two-letter ISO 639-1 language of // the items in the data source. `feedLabel` and `contentLanguage` must be diff --git a/merchantapi/products_v1beta/merchantapi-api.json b/merchantapi/products_v1beta/merchantapi-api.json index 78f77be6c35..31b3603c8f0 100644 --- a/merchantapi/products_v1beta/merchantapi-api.json +++ b/merchantapi/products_v1beta/merchantapi-api.json @@ -242,7 +242,7 @@ } } }, - "revision": "20240613", + "revision": "20240719", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Attributes": { @@ -1085,6 +1085,10 @@ "format": "int64", "type": "string" }, + "memberPriceEffectiveDate": { + "$ref": "Interval", + "description": "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." + }, "price": { "$ref": "Price", "description": "The price for members of the given tier, that is, the instant discount price. Must be smaller or equal to the regular price." diff --git a/merchantapi/products_v1beta/merchantapi-gen.go b/merchantapi/products_v1beta/merchantapi-gen.go index b0091308fc1..a8ca1de8f44 100644 --- a/merchantapi/products_v1beta/merchantapi-gen.go +++ b/merchantapi/products_v1beta/merchantapi-gen.go @@ -933,6 +933,11 @@ type LoyaltyProgram struct { CashbackForFutureUse *Price `json:"cashbackForFutureUse,omitempty"` // LoyaltyPoints: The amount of loyalty points earned on a purchase. LoyaltyPoints int64 `json:"loyaltyPoints,omitempty,string"` + // MemberPriceEffectiveDate: 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. + MemberPriceEffectiveDate *Interval `json:"memberPriceEffectiveDate,omitempty"` // Price: The price for members of the given tier, that is, the instant // discount price. Must be smaller or equal to the regular price. Price *Price `json:"price,omitempty"` diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index c9da3585cb5..3ee67cfeb2b 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -2473,7 +2473,7 @@ } } }, - "revision": "20240704", + "revision": "20240711", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -3452,7 +3452,7 @@ "description": "Preferences concerning the machine types to consider on Compute Engine." }, "multithreading": { - "description": "Optional. Preferences for multithreading support.", + "description": "Optional. Preferences for multithreading support on Windows Server.", "enum": [ "MULTITHREADING_UNSPECIFIED", "MULTITHREADING_DISABLED", @@ -3460,10 +3460,10 @@ "MULTITHREADING_DISABLED_WITH_COMPENSATION" ], "enumDescriptions": [ - "Same as MULTITHREADING_DISABLED_WITH_COMPENSATION.", - "Disable simultaneous multithreading if doing so is advantageous.", - "Always enable simultaneous multithreading.", - "Disable simultaneous multithreading and increase number of VCPUs to compensate, if doing so is advantageous." + "Same as MULTITHREADING_AUTO.", + "Disable simultaneous multithreading.", + "Enable simultaneous multithreading.", + "Disable simultaneous multithreading and increase number of VCPUs to compensate." ], "type": "string" }, @@ -4070,10 +4070,10 @@ "MULTITHREADING_DISABLED_WITH_COMPENSATION" ], "enumDescriptions": [ - "Same as MULTITHREADING_DISABLED_WITH_COMPENSATION.", - "Disable simultaneous multithreading if doing so is lower cost.", - "Always enable simultaneous multithreading.", - "Disable simultaneous multithreading and increase number of VCPUs to compensate, if doing so is lower cost." + "Same as MULTITHREADING_AUTO.", + "Disable simultaneous multithreading.", + "Enable simultaneous multithreading.", + "Disable simultaneous multithreading and increase number of VCPUs to compensate." ], "type": "string" }, @@ -6991,7 +6991,8 @@ }, "monthlyCostCompute": { "$ref": "Money", - "description": "Compute monthly cost for this preference set." + "description": "Output only. Compute monthly cost for this preference set.", + "readOnly": true }, "monthlyCostDatabaseBackup": { "$ref": "Money", @@ -7005,23 +7006,28 @@ }, "monthlyCostNetworkEgress": { "$ref": "Money", - "description": "Network Egress monthly cost for this preference set. Only present for virtual machines." + "description": "Output only. Network Egress monthly cost for this preference set. Only present for virtual machines.", + "readOnly": true }, "monthlyCostOsLicense": { "$ref": "Money", - "description": "Operating system licensing monthly cost for this preference set. Only present for virtual machines." + "description": "Output only. Operating system licensing monthly cost for this preference set. Only present for virtual machines.", + "readOnly": true }, "monthlyCostOther": { "$ref": "Money", - "description": "Miscellaneous monthly cost for this preference set." + "description": "Output only. Miscellaneous monthly cost for this preference set.", + "readOnly": true }, "monthlyCostStorage": { "$ref": "Money", - "description": "Storage monthly cost for this preference set." + "description": "Output only. Storage monthly cost for this preference set.", + "readOnly": true }, "monthlyCostTotal": { "$ref": "Money", - "description": "Total monthly cost for this preference set." + "description": "Output only. Total monthly cost for this preference set.", + "readOnly": true }, "preferenceSet": { "$ref": "PreferenceSet", diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 84ca69eb7db..65359264941 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -1429,17 +1429,15 @@ type ComputeEnginePreferences struct { // MachinePreferences: Preferences concerning the machine types to consider on // Compute Engine. MachinePreferences *MachinePreferences `json:"machinePreferences,omitempty"` - // Multithreading: Optional. Preferences for multithreading support. + // Multithreading: Optional. Preferences for multithreading support on Windows + // Server. // // Possible values: - // "MULTITHREADING_UNSPECIFIED" - Same as - // MULTITHREADING_DISABLED_WITH_COMPENSATION. - // "MULTITHREADING_DISABLED" - Disable simultaneous multithreading if doing - // so is advantageous. - // "MULTITHREADING_ENABLED" - Always enable simultaneous multithreading. + // "MULTITHREADING_UNSPECIFIED" - Same as MULTITHREADING_AUTO. + // "MULTITHREADING_DISABLED" - Disable simultaneous multithreading. + // "MULTITHREADING_ENABLED" - Enable simultaneous multithreading. // "MULTITHREADING_DISABLED_WITH_COMPENSATION" - Disable simultaneous - // multithreading and increase number of VCPUs to compensate, if doing so is - // advantageous. + // multithreading and increase number of VCPUs to compensate. Multithreading string `json:"multithreading,omitempty"` // OsPricingPreferences: Optional. Pricing options for OS images. OsPricingPreferences *OperatingSystemPricingPreferences `json:"osPricingPreferences,omitempty"` @@ -2183,14 +2181,11 @@ type DatabasePreferencesCloudSqlSqlServer struct { // Multithreading: Optional. Preferences for multithreading support. // // Possible values: - // "MULTITHREADING_UNSPECIFIED" - Same as - // MULTITHREADING_DISABLED_WITH_COMPENSATION. - // "MULTITHREADING_DISABLED" - Disable simultaneous multithreading if doing - // so is lower cost. - // "MULTITHREADING_ENABLED" - Always enable simultaneous multithreading. + // "MULTITHREADING_UNSPECIFIED" - Same as MULTITHREADING_AUTO. + // "MULTITHREADING_DISABLED" - Disable simultaneous multithreading. + // "MULTITHREADING_ENABLED" - Enable simultaneous multithreading. // "MULTITHREADING_DISABLED_WITH_COMPENSATION" - Disable simultaneous - // multithreading and increase number of VCPUs to compensate, if doing so is - // lower cost. + // multithreading and increase number of VCPUs to compensate. Multithreading string `json:"multithreading,omitempty"` // VersionType: Optional. Edition of Microsoft SQL version that is used on a // Cloud SQL for SQL server instance. @@ -5538,7 +5533,8 @@ type ReportSummaryGroupPreferenceSetFinding struct { // MachinePreferences: A set of preferences that applies to all machines in the // context. MachinePreferences *VirtualMachinePreferences `json:"machinePreferences,omitempty"` - // MonthlyCostCompute: Compute monthly cost for this preference set. + // MonthlyCostCompute: Output only. Compute monthly cost for this preference + // set. MonthlyCostCompute *Money `json:"monthlyCostCompute,omitempty"` // MonthlyCostDatabaseBackup: Output only. Backup monthly cost for this // preference set. Only present for databases. @@ -5546,17 +5542,19 @@ type ReportSummaryGroupPreferenceSetFinding struct { // MonthlyCostDatabaseLicensing: Output only. Database licensing monthly cost // for this preference set. Only present for databases. MonthlyCostDatabaseLicensing *Money `json:"monthlyCostDatabaseLicensing,omitempty"` - // MonthlyCostNetworkEgress: Network Egress monthly cost for this preference - // set. Only present for virtual machines. - MonthlyCostNetworkEgress *Money `json:"monthlyCostNetworkEgress,omitempty"` - // MonthlyCostOsLicense: Operating system licensing monthly cost for this + // MonthlyCostNetworkEgress: Output only. Network Egress monthly cost for this // preference set. Only present for virtual machines. + MonthlyCostNetworkEgress *Money `json:"monthlyCostNetworkEgress,omitempty"` + // MonthlyCostOsLicense: Output only. Operating system licensing monthly cost + // for this preference set. Only present for virtual machines. MonthlyCostOsLicense *Money `json:"monthlyCostOsLicense,omitempty"` - // MonthlyCostOther: Miscellaneous monthly cost for this preference set. + // MonthlyCostOther: Output only. Miscellaneous monthly cost for this + // preference set. MonthlyCostOther *Money `json:"monthlyCostOther,omitempty"` - // MonthlyCostStorage: Storage monthly cost for this preference set. + // MonthlyCostStorage: Output only. Storage monthly cost for this preference + // set. MonthlyCostStorage *Money `json:"monthlyCostStorage,omitempty"` - // MonthlyCostTotal: Total monthly cost for this preference set. + // MonthlyCostTotal: Output only. Total monthly cost for this preference set. MonthlyCostTotal *Money `json:"monthlyCostTotal,omitempty"` // PreferenceSet: Output only. A copy of the preference set used for this // finding. diff --git a/ondemandscanning/v1/ondemandscanning-api.json b/ondemandscanning/v1/ondemandscanning-api.json index 6ad06410514..6a954a1a837 100644 --- a/ondemandscanning/v1/ondemandscanning-api.json +++ b/ondemandscanning/v1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20240709", + "revision": "20240715", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1939,7 +1939,8 @@ "NUGET", "RUBYGEMS", "RUST", - "COMPOSER" + "COMPOSER", + "SWIFT" ], "enumDescriptions": [ "", @@ -1952,7 +1953,8 @@ "Nuget (C#/.NET) packages.", "Ruby packges (from RubyGems package manager).", "Rust packages from Cargo (Github ecosystem is `RUST`).", - "PHP packages from Composer package manager." + "PHP packages from Composer package manager.", + "Swift packages from Swift Package Manager (SwiftPM)." ], "type": "string" }, diff --git a/ondemandscanning/v1/ondemandscanning-gen.go b/ondemandscanning/v1/ondemandscanning-gen.go index e88d4fdf80a..e30c80282de 100644 --- a/ondemandscanning/v1/ondemandscanning-gen.go +++ b/ondemandscanning/v1/ondemandscanning-gen.go @@ -2104,6 +2104,7 @@ type PackageData struct { // "RUBYGEMS" - Ruby packges (from RubyGems package manager). // "RUST" - Rust packages from Cargo (Github ecosystem is `RUST`). // "COMPOSER" - PHP packages from Composer package manager. + // "SWIFT" - Swift packages from Swift Package Manager (SwiftPM). PackageType string `json:"packageType,omitempty"` // PatchedCve: CVEs that this package is no longer vulnerable to // go/drydock-dd-custom-binary-scanning diff --git a/ondemandscanning/v1beta1/ondemandscanning-api.json b/ondemandscanning/v1beta1/ondemandscanning-api.json index 8a5477b1b29..2732e38a5b5 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-api.json +++ b/ondemandscanning/v1beta1/ondemandscanning-api.json @@ -339,7 +339,7 @@ } } }, - "revision": "20240709", + "revision": "20240715", "rootUrl": "https://ondemandscanning.googleapis.com/", "schemas": { "AliasContext": { @@ -1934,7 +1934,8 @@ "NUGET", "RUBYGEMS", "RUST", - "COMPOSER" + "COMPOSER", + "SWIFT" ], "enumDescriptions": [ "", @@ -1947,7 +1948,8 @@ "Nuget (C#/.NET) packages.", "Ruby packges (from RubyGems package manager).", "Rust packages from Cargo (Github ecosystem is `RUST`).", - "PHP packages from Composer package manager." + "PHP packages from Composer package manager.", + "Swift packages from Swift Package Manager (SwiftPM)." ], "type": "string" }, diff --git a/ondemandscanning/v1beta1/ondemandscanning-gen.go b/ondemandscanning/v1beta1/ondemandscanning-gen.go index 36ece92c88e..01bebca4c9b 100644 --- a/ondemandscanning/v1beta1/ondemandscanning-gen.go +++ b/ondemandscanning/v1beta1/ondemandscanning-gen.go @@ -2100,6 +2100,7 @@ type PackageData struct { // "RUBYGEMS" - Ruby packges (from RubyGems package manager). // "RUST" - Rust packages from Cargo (Github ecosystem is `RUST`). // "COMPOSER" - PHP packages from Composer package manager. + // "SWIFT" - Swift packages from Swift Package Manager (SwiftPM). PackageType string `json:"packageType,omitempty"` // PatchedCve: CVEs that this package is no longer vulnerable to // go/drydock-dd-custom-binary-scanning diff --git a/pollen/v1/pollen-api.json b/pollen/v1/pollen-api.json index d32bb2acdfd..31fd9c6ce06 100644 --- a/pollen/v1/pollen-api.json +++ b/pollen/v1/pollen-api.json @@ -121,7 +121,7 @@ "type": "integer" }, "languageCode": { - "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. Default value is \"en\".", + "description": "Optional. Allows the client to choose the language for the response. If data cannot be provided for that language, the API uses the closest match. Allowed values rely on the IETF BCP-47 standard. The default value is \"en\".", "location": "query", "type": "string" }, @@ -138,18 +138,18 @@ "type": "number" }, "pageSize": { - "description": "Optional. The maximum number of daily info records to return per page. The default and max value is 5 (5 days of data).", + "description": "Optional. The maximum number of daily info records to return per page. The default and max value is 5, indicating 5 days of data.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "Optional. A page token received from a previous daily call. It is used to retrieve the subsequent page. Note that when providing a value for the page token all other request parameters provided must match the previous call that provided the page token.", + "description": "Optional. A page token received from a previous daily call. It is used to retrieve the subsequent page. Note that when providing a value for the page token, all other request parameters provided must match the previous call that provided the page token.", "location": "query", "type": "string" }, "plantsDescription": { - "description": "Optional. Contains general information about plants, including details on their seasonality, special shapes and colors, information about allergic cross-reactions, and plant photos.", + "description": "Optional. Contains general information about plants, including details on their seasonality, special shapes and colors, information about allergic cross-reactions, and plant photos. The default value is \"true\".", "location": "query", "type": "boolean" } @@ -192,7 +192,7 @@ "Unspecified map type.", "The heatmap type will represent a tree index graphical map.", "The heatmap type will represent a grass index graphical map.", - "The heatmap type will represent a weed index graphically map." + "The heatmap type will represent a weed index graphical map." ], "location": "path", "required": true, @@ -233,7 +233,7 @@ } } }, - "revision": "20240611", + "revision": "20240720", "rootUrl": "https://pollen.googleapis.com/", "schemas": { "Color": { @@ -294,14 +294,14 @@ "description": "The date in UTC at which the pollen forecast data is represented." }, "plantInfo": { - "description": "This list will include (up to) 15 pollen species affecting the location specified in the request.", + "description": "This list will include up to 15 pollen species affecting the location specified in the request.", "items": { "$ref": "PlantInfo" }, "type": "array" }, "pollenTypeInfo": { - "description": "This list will include (up to) three pollen types (grass, weed, tree) affecting the location specified in the request.", + "description": "This list will include up to three pollen types (GRASS, WEED, TREE) affecting the location specified in the request.", "items": { "$ref": "PollenTypeInfo" }, diff --git a/pollen/v1/pollen-gen.go b/pollen/v1/pollen-gen.go index c57831667b7..65502de8f5c 100644 --- a/pollen/v1/pollen-gen.go +++ b/pollen/v1/pollen-gen.go @@ -333,11 +333,11 @@ func (s Date) MarshalJSON() ([]byte, error) { type DayInfo struct { // Date: The date in UTC at which the pollen forecast data is represented. Date *Date `json:"date,omitempty"` - // PlantInfo: This list will include (up to) 15 pollen species affecting the + // PlantInfo: This list will include up to 15 pollen species affecting the // location specified in the request. PlantInfo []*PlantInfo `json:"plantInfo,omitempty"` - // PollenTypeInfo: This list will include (up to) three pollen types (grass, - // weed, tree) affecting the location specified in the request. + // PollenTypeInfo: This list will include up to three pollen types (GRASS, + // WEED, TREE) affecting the location specified in the request. PollenTypeInfo []*PollenTypeInfo `json:"pollenTypeInfo,omitempty"` // ForceSendFields is a list of field names (e.g. "Date") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -644,8 +644,8 @@ func (c *ForecastLookupCall) Days(days int64) *ForecastLookupCall { // LanguageCode sets the optional parameter "languageCode": Allows the client // to choose the language for the response. If data cannot be provided for that -// language the API uses the closest match. Allowed values rely on the IETF -// BCP-47 standard. Default value is "en". +// language, the API uses the closest match. Allowed values rely on the IETF +// BCP-47 standard. The default value is "en". func (c *ForecastLookupCall) LanguageCode(languageCode string) *ForecastLookupCall { c.urlParams_.Set("languageCode", languageCode) return c @@ -666,8 +666,8 @@ func (c *ForecastLookupCall) LocationLongitude(locationLongitude float64) *Forec } // PageSize sets the optional parameter "pageSize": The maximum number of daily -// info records to return per page. The default and max value is 5 (5 days of -// data). +// info records to return per page. The default and max value is 5, indicating +// 5 days of data. func (c *ForecastLookupCall) PageSize(pageSize int64) *ForecastLookupCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c @@ -675,7 +675,7 @@ func (c *ForecastLookupCall) PageSize(pageSize int64) *ForecastLookupCall { // PageToken sets the optional parameter "pageToken": A page token received // from a previous daily call. It is used to retrieve the subsequent page. Note -// that when providing a value for the page token all other request parameters +// that when providing a value for the page token, all other request parameters // provided must match the previous call that provided the page token. func (c *ForecastLookupCall) PageToken(pageToken string) *ForecastLookupCall { c.urlParams_.Set("pageToken", pageToken) @@ -685,7 +685,7 @@ func (c *ForecastLookupCall) PageToken(pageToken string) *ForecastLookupCall { // PlantsDescription sets the optional parameter "plantsDescription": Contains // general information about plants, including details on their seasonality, // special shapes and colors, information about allergic cross-reactions, and -// plant photos. +// plant photos. The default value is "true". func (c *ForecastLookupCall) PlantsDescription(plantsDescription bool) *ForecastLookupCall { c.urlParams_.Set("plantsDescription", fmt.Sprint(plantsDescription)) return c diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index 129c55f48b6..44adb374717 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -694,7 +694,7 @@ } } }, - "revision": "20240526", + "revision": "20240713", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1032,7 +1032,7 @@ "type": "string" }, "express": { - "description": "Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, `site_key` must reference a SCORE key with WAF feature set to EXPRESS.", + "description": "Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, `site_key` must reference an Express site key.", "type": "boolean" }, "firewallPolicyEvaluation": { @@ -1105,6 +1105,12 @@ }, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1ExpressKeySettings": { + "description": "Settings specific to keys that can be used for reCAPTCHA Express.", + "id": "GoogleCloudRecaptchaenterpriseV1ExpressKeySettings", + "properties": {}, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1FirewallAction": { "description": "An individual action. Each action represents what to do if a policy matches.", "id": "GoogleCloudRecaptchaenterpriseV1FirewallAction", @@ -1403,6 +1409,10 @@ "description": "Required. Human-readable display name of this key. Modifiable by user.", "type": "string" }, + "expressSettings": { + "$ref": "GoogleCloudRecaptchaenterpriseV1ExpressKeySettings", + "description": "Settings for keys that can be used by reCAPTCHA Express." + }, "iosSettings": { "$ref": "GoogleCloudRecaptchaenterpriseV1IOSKeySettings", "description": "Settings for keys that can be used by iOS apps." @@ -1411,7 +1421,7 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha-enterprise/docs/labels).", + "description": "Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).", "type": "object" }, "name": { @@ -1541,7 +1551,7 @@ "id": "GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest", "properties": { "skipBillingCheck": { - "description": "Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha-enterprise/docs/billing-information.", + "description": "Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha/docs/billing-information.", "type": "boolean" } }, diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 5a3570be982..25ba2f52426 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -617,8 +617,7 @@ type GoogleCloudRecaptchaenterpriseV1Event struct { // platforms already integrated with recaptcha enterprise. ExpectedAction string `json:"expectedAction,omitempty"` // Express: Optional. Flag for a reCAPTCHA express request for an assessment - // without a token. If enabled, `site_key` must reference a SCORE key with WAF - // feature set to EXPRESS. + // without a token. If enabled, `site_key` must reference an Express site key. Express bool `json:"express,omitempty"` // FirewallPolicyEvaluation: Optional. Flag for enabling firewall policy config // assessment. If this flag is enabled, the firewall policy will be evaluated @@ -691,6 +690,11 @@ func (s GoogleCloudRecaptchaenterpriseV1Event) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRecaptchaenterpriseV1ExpressKeySettings: Settings specific to +// keys that can be used for reCAPTCHA Express. +type GoogleCloudRecaptchaenterpriseV1ExpressKeySettings struct { +} + // GoogleCloudRecaptchaenterpriseV1FirewallAction: An individual action. Each // action represents what to do if a policy matches. type GoogleCloudRecaptchaenterpriseV1FirewallAction struct { @@ -1197,10 +1201,12 @@ type GoogleCloudRecaptchaenterpriseV1Key struct { // DisplayName: Required. Human-readable display name of this key. Modifiable // by user. DisplayName string `json:"displayName,omitempty"` + // ExpressSettings: Settings for keys that can be used by reCAPTCHA Express. + ExpressSettings *GoogleCloudRecaptchaenterpriseV1ExpressKeySettings `json:"expressSettings,omitempty"` // IosSettings: Settings for keys that can be used by iOS apps. IosSettings *GoogleCloudRecaptchaenterpriseV1IOSKeySettings `json:"iosSettings,omitempty"` // Labels: Optional. See [Creating and managing labels] - // (https://cloud.google.com/recaptcha-enterprise/docs/labels). + // (https://cloud.google.com/recaptcha/docs/labels). Labels map[string]string `json:"labels,omitempty"` // Name: Identifier. The resource name for the Key in the format // `projects/{project}/keys/{key}`. @@ -1389,11 +1395,11 @@ type GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest struct { // SkipBillingCheck: Optional. If true, skips the billing check. A reCAPTCHA // Enterprise key or migrated key behaves differently than a reCAPTCHA // (non-Enterprise version) key when you reach a quota limit (see - // https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid - // any disruption of your usage, we check that a billing account is present. If + // https://cloud.google.com/recaptcha/quotas#quota_limit). To avoid any + // disruption of your usage, we check that a billing account is present. If // your usage of reCAPTCHA is under the free quota, you can safely skip the // billing check and proceed with the migration. See - // https://cloud.google.com/recaptcha-enterprise/docs/billing-information. + // https://cloud.google.com/recaptcha/docs/billing-information. SkipBillingCheck bool `json:"skipBillingCheck,omitempty"` // ForceSendFields is a list of field names (e.g. "SkipBillingCheck") to // unconditionally include in API requests. By default, fields with empty or diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index e73cc1f92f1..862c71346ce 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240613", + "revision": "20240711", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1231,8 +1231,7 @@ "type": "string" }, "observabilityMetricData": { - "$ref": "ObservabilityMetricData", - "description": "More feed data would be added in subsequent CLs" + "$ref": "ObservabilityMetricData" }, "recommendationSignalData": { "$ref": "DatabaseResourceRecommendationSignalData" diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 2b0d29d604c..6f66010a01a 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -643,8 +643,7 @@ type DatabaseResourceFeed 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 *ObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *DatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index d9a8d0202e9..4760ddc20df 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240613", + "revision": "20240711", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1231,8 +1231,7 @@ "type": "string" }, "observabilityMetricData": { - "$ref": "ObservabilityMetricData", - "description": "More feed data would be added in subsequent CLs" + "$ref": "ObservabilityMetricData" }, "recommendationSignalData": { "$ref": "DatabaseResourceRecommendationSignalData" diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 8e4e050416d..c3a5b40177f 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -643,8 +643,7 @@ type DatabaseResourceFeed 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 *ObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *DatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 4c08fe02266..17898611537 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2259,6 +2259,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:export", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.userEvents.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/userEvents:export", + "request": { + "$ref": "GoogleCloudRetailV2alphaExportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "import": { "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.", "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import", @@ -2557,7 +2585,7 @@ } } }, - "revision": "20240702", + "revision": "20240711", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4483,6 +4511,21 @@ }, "type": "object" }, + "GoogleCloudRetailV2alphaExportUserEventsRequest": { + "description": "Request message for the `ExportUserEvents` method.", + "id": "GoogleCloudRetailV2alphaExportUserEventsRequest", + "properties": { + "filter": { + "description": "A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime\u003c\"2012-04-23T18:25:43.511Z\" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\"` * Example 2: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime \u003c \"2018-04-23T18:30:43.511Z\"` * Example 4: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`", + "type": "string" + }, + "outputConfig": { + "$ref": "GoogleCloudRetailV2alphaOutputConfig", + "description": "Required. The output location of the data." + } + }, + "type": "object" + }, "GoogleCloudRetailV2alphaExportUserEventsResponse": { "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", "id": "GoogleCloudRetailV2alphaExportUserEventsResponse", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index 2095a9e3718..aba3b7a5556 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -3231,6 +3231,51 @@ func (s GoogleCloudRetailV2alphaExportProductsResponse) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2alphaExportUserEventsRequest: Request message for the +// `ExportUserEvents` method. +type GoogleCloudRetailV2alphaExportUserEventsRequest struct { + // Filter: A filtering expression to specify restrictions on returned events. + // The expression is a sequence of terms. Each term applies a restriction to + // the returned user events. Use this expression to restrict results to a + // specific time range or to filter events by eventType. For example, + // `eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems + // eventTime<"2012-04-23T18:25:43.511Z" eventType=search` We expect only three + // types of fields: * `eventTime`: This can be specified twice, once with a + // less than operator and once with a greater than operator. The `eventTime` + // restriction should result in one, contiguous, valid, `eventTime` range. * + // `eventType`: Boolean operators `OR` and `NOT` are supported if the + // expression is enclosed in parentheses and the operators are separated from + // the tag values by a space. * `eventsMissingCatalogItems`: This restricts + // results to events for which catalog items were not found in the catalog. The + // default behavior is to return only those events for which catalog items were + // found. Some examples of valid filters expressions: * Example 1: `eventTime > + // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * Example + // 2: `eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view` * + // Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < + // "2018-04-23T18:30:43.511Z" * Example 4: `eventTime > + // "2012-04-23T18:25:43.511Z" * Example 5: `eventType = (detail-page-view OR + // search)` * Example 6: `eventsMissingCatalogItems` + Filter string `json:"filter,omitempty"` + // OutputConfig: Required. The output location of the data. + OutputConfig *GoogleCloudRetailV2alphaOutputConfig `json:"outputConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2alphaExportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2alphaExportUserEventsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2alphaExportUserEventsResponse: Response of the // ExportUserEventsRequest. If the long running operation was successful, then // this message is returned by the google.longrunning.Operations.response field @@ -16938,6 +16983,110 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsCatalogsUserEventsExportCall struct { + s *Service + parent string + googlecloudretailv2alphaexportusereventsrequest *GoogleCloudRetailV2alphaExportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports user events. `Operation.response` is of type +// `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`. +// +// - parent: Resource name of a Catalog. For example +// `projects/1234/locations/global/catalogs/default_catalog`. +func (r *ProjectsLocationsCatalogsUserEventsService) Export(parent string, googlecloudretailv2alphaexportusereventsrequest *GoogleCloudRetailV2alphaExportUserEventsRequest) *ProjectsLocationsCatalogsUserEventsExportCall { + c := &ProjectsLocationsCatalogsUserEventsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2alphaexportusereventsrequest = googlecloudretailv2alphaexportusereventsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUserEventsExportCall) 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.googlecloudretailv2alphaexportusereventsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/userEvents:export") + 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 "retail.projects.locations.catalogs.userEvents.export" 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 *ProjectsLocationsCatalogsUserEventsExportCall) 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 ProjectsLocationsCatalogsUserEventsImportCall struct { s *Service parent string diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index 42a1c521580..0770a88e9ef 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -1854,6 +1854,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Exports user events. `Operation.response` is of type `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:export", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.userEvents.export", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Resource name of a Catalog. For example `projects/1234/locations/global/catalogs/default_catalog`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/userEvents:export", + "request": { + "$ref": "GoogleCloudRetailV2betaExportUserEventsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "import": { "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import", @@ -2120,7 +2148,7 @@ } } }, - "revision": "20240702", + "revision": "20240711", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -4606,6 +4634,21 @@ }, "type": "object" }, + "GoogleCloudRetailV2betaExportUserEventsRequest": { + "description": "Request message for the `ExportUserEvents` method.", + "id": "GoogleCloudRetailV2betaExportUserEventsRequest", + "properties": { + "filter": { + "description": "A filtering expression to specify restrictions on returned events. The expression is a sequence of terms. Each term applies a restriction to the returned user events. Use this expression to restrict results to a specific time range or to filter events by eventType. For example, `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime\u003c\"2012-04-23T18:25:43.511Z\" eventType=search` We expect only three types of fields: * `eventTime`: This can be specified twice, once with a less than operator and once with a greater than operator. The `eventTime` restriction should result in one, contiguous, valid, `eventTime` range. * `eventType`: Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses and the operators are separated from the tag values by a space. * `eventsMissingCatalogItems`: This restricts results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventTime \u003c \"2012-04-23T18:30:43.511Z\"` * Example 2: `eventTime \u003e \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view` * Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime \u003c \"2018-04-23T18:30:43.511Z\"` * Example 4: `eventTime \u003e \"2012-04-23T18:25:43.511Z\"` * Example 5: `eventType = (detail-page-view OR search)` * Example 6: `eventsMissingCatalogItems`", + "type": "string" + }, + "outputConfig": { + "$ref": "GoogleCloudRetailV2betaOutputConfig", + "description": "Required. The output location of the data." + } + }, + "type": "object" + }, "GoogleCloudRetailV2betaExportUserEventsResponse": { "description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", "id": "GoogleCloudRetailV2betaExportUserEventsResponse", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index 23d6868dd29..868e20f8c1e 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -3989,6 +3989,51 @@ func (s GoogleCloudRetailV2betaExportProductsResponse) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2betaExportUserEventsRequest: Request message for the +// `ExportUserEvents` method. +type GoogleCloudRetailV2betaExportUserEventsRequest struct { + // Filter: A filtering expression to specify restrictions on returned events. + // The expression is a sequence of terms. Each term applies a restriction to + // the returned user events. Use this expression to restrict results to a + // specific time range or to filter events by eventType. For example, + // `eventTime > "2012-04-23T18:25:43.511Z" eventsMissingCatalogItems + // eventTime<"2012-04-23T18:25:43.511Z" eventType=search` We expect only three + // types of fields: * `eventTime`: This can be specified twice, once with a + // less than operator and once with a greater than operator. The `eventTime` + // restriction should result in one, contiguous, valid, `eventTime` range. * + // `eventType`: Boolean operators `OR` and `NOT` are supported if the + // expression is enclosed in parentheses and the operators are separated from + // the tag values by a space. * `eventsMissingCatalogItems`: This restricts + // results to events for which catalog items were not found in the catalog. The + // default behavior is to return only those events for which catalog items were + // found. Some examples of valid filters expressions: * Example 1: `eventTime > + // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * Example + // 2: `eventTime > "2012-04-23T18:25:43.511Z" eventType = detail-page-view` * + // Example 3: `eventsMissingCatalogItems eventType = (NOT search) eventTime < + // "2018-04-23T18:30:43.511Z" * Example 4: `eventTime > + // "2012-04-23T18:25:43.511Z" * Example 5: `eventType = (detail-page-view OR + // search)` * Example 6: `eventsMissingCatalogItems` + Filter string `json:"filter,omitempty"` + // OutputConfig: Required. The output location of the data. + OutputConfig *GoogleCloudRetailV2betaOutputConfig `json:"outputConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudRetailV2betaExportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2betaExportUserEventsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2betaExportUserEventsResponse: Response of the // ExportUserEventsRequest. If the long running operation was successful, then // this message is returned by the google.longrunning.Operations.response field @@ -14832,6 +14877,110 @@ func (c *ProjectsLocationsCatalogsUserEventsCollectCall) Do(opts ...googleapi.Ca return ret, nil } +type ProjectsLocationsCatalogsUserEventsExportCall struct { + s *Service + parent string + googlecloudretailv2betaexportusereventsrequest *GoogleCloudRetailV2betaExportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports user events. `Operation.response` is of type +// `ExportResponse`. `Operation.metadata` is of type `ExportMetadata`. +// +// - parent: Resource name of a Catalog. For example +// `projects/1234/locations/global/catalogs/default_catalog`. +func (r *ProjectsLocationsCatalogsUserEventsService) Export(parent string, googlecloudretailv2betaexportusereventsrequest *GoogleCloudRetailV2betaExportUserEventsRequest) *ProjectsLocationsCatalogsUserEventsExportCall { + c := &ProjectsLocationsCatalogsUserEventsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudretailv2betaexportusereventsrequest = googlecloudretailv2betaexportusereventsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsUserEventsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Context(ctx context.Context) *ProjectsLocationsCatalogsUserEventsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCatalogsUserEventsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsUserEventsExportCall) 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.googlecloudretailv2betaexportusereventsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/userEvents:export") + 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 "retail.projects.locations.catalogs.userEvents.export" 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 *ProjectsLocationsCatalogsUserEventsExportCall) 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 ProjectsLocationsCatalogsUserEventsImportCall struct { s *Service parent string diff --git a/run/v1/run-api.json b/run/v1/run-api.json index 6bd90baf587..e631b6c2944 100644 --- a/run/v1/run-api.json +++ b/run/v1/run-api.json @@ -2614,7 +2614,7 @@ } } }, - "revision": "20240705", + "revision": "20240712", "rootUrl": "https://run.googleapis.com/", "schemas": { "Addressable": { @@ -5674,7 +5674,7 @@ "id": "RevisionSpec", "properties": { "containerConcurrency": { - "description": "ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container instance of the Revision. If not specified, defaults to 80.", + "description": "ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container instance of the Revision. If not specified or 0, defaults to 80 when requested CPU \u003e= 1 and defaults to 1 when requested CPU \u003c 1.", "format": "int32", "type": "integer" }, diff --git a/run/v1/run-gen.go b/run/v1/run-gen.go index 30eb8c79224..c9d8e21e6f7 100644 --- a/run/v1/run-gen.go +++ b/run/v1/run-gen.go @@ -4312,7 +4312,8 @@ func (s Revision) MarshalJSON() ([]byte, error) { type RevisionSpec struct { // ContainerConcurrency: ContainerConcurrency specifies the maximum allowed // in-flight (concurrent) requests per container instance of the Revision. If - // not specified, defaults to 80. + // not specified or 0, defaults to 80 when requested CPU >= 1 and defaults to 1 + // when requested CPU < 1. ContainerConcurrency int64 `json:"containerConcurrency,omitempty"` // Containers: Required. Containers holds the list which define the units of // execution for this Revision. In the context of a Revision, we disallow a diff --git a/run/v2/run-api.json b/run/v2/run-api.json index ca82f52d608..32ec52e2f25 100644 --- a/run/v2/run-api.json +++ b/run/v2/run-api.json @@ -1494,7 +1494,7 @@ } } }, - "revision": "20240705", + "revision": "20240712", "rootUrl": "https://run.googleapis.com/", "schemas": { "GoogleCloudRunV2BinaryAuthorization": { @@ -2979,7 +2979,7 @@ "type": "object" }, "maxInstanceRequestConcurrency": { - "description": "Optional. Sets the maximum number of requests that each serving instance can receive.", + "description": "Optional. Sets the maximum number of requests that each serving instance can receive. If not specified or 0, defaults to 80 when requested CPU \u003e= 1 and defaults to 1 when requested CPU \u003c 1.", "format": "int32", "type": "integer" }, diff --git a/run/v2/run-gen.go b/run/v2/run-gen.go index 6f8f78030b6..6c6f623e170 100644 --- a/run/v2/run-gen.go +++ b/run/v2/run-gen.go @@ -1941,7 +1941,8 @@ type GoogleCloudRunV2RevisionTemplate struct { // v2 RevisionTemplate. Labels map[string]string `json:"labels,omitempty"` // MaxInstanceRequestConcurrency: Optional. Sets the maximum number of requests - // that each serving instance can receive. + // that each serving instance can receive. If not specified or 0, defaults to + // 80 when requested CPU >= 1 and defaults to 1 when requested CPU < 1. MaxInstanceRequestConcurrency int64 `json:"maxInstanceRequestConcurrency,omitempty"` // NodeSelector: Optional. The node selector for the revision template. NodeSelector *GoogleCloudRunV2NodeSelector `json:"nodeSelector,omitempty"` diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 49905e1c91c..79a9a28aba5 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -414,7 +414,7 @@ ], "parameters": { "parent": { - "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -446,7 +446,7 @@ ], "parameters": { "parent": { - "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -474,7 +474,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -499,7 +499,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -535,7 +535,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -571,7 +571,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -634,7 +634,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", + "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", "required": true, @@ -670,7 +670,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -2190,7 +2190,7 @@ ], "parameters": { "parent": { - "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -2222,7 +2222,7 @@ ], "parameters": { "parent": { - "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -2250,7 +2250,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -2275,7 +2275,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -2311,7 +2311,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -2347,7 +2347,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -2410,7 +2410,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", + "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", "required": true, @@ -2446,7 +2446,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -4649,7 +4649,7 @@ ], "parameters": { "parent": { - "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -4681,7 +4681,7 @@ ], "parameters": { "parent": { - "description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. The new custom module's parent. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -4709,7 +4709,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to delete. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -4734,7 +4734,7 @@ ], "parameters": { "name": { - "description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", + "description": "Required. Name of the custom module to get. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", "required": true, @@ -4770,7 +4770,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -4806,7 +4806,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules under. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -4869,7 +4869,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", + "description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", "required": true, @@ -4905,7 +4905,7 @@ "type": "string" }, "parent": { - "description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", + "description": "Required. Name of the parent to list custom modules for. Its format is: * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -6027,7 +6027,7 @@ } } }, - "revision": "20240705", + "revision": "20240720", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -9178,7 +9178,7 @@ "type": "string" }, "dataset": { - "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", + "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", "type": "string" }, "description": { @@ -9195,7 +9195,7 @@ "type": "string" }, "name": { - "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", + "description": "Identifier. The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", "type": "string" }, "principal": { @@ -10871,7 +10871,7 @@ "type": "string" }, "name": { - "description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", + "description": "Identifier. This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", "type": "string" }, "type": { @@ -11359,7 +11359,7 @@ "type": "string" }, "name": { - "description": "Name for the resource value configuration", + "description": "Identifier. Name for the resource value configuration", "type": "string" }, "resourceLabelsSelector": { @@ -11374,7 +11374,7 @@ "type": "string" }, "resourceValue": { - "description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", + "description": "Resource value level this expression represents Only required when there is no Sensitive Data Protection mapping in the request", "enum": [ "RESOURCE_VALUE_UNSPECIFIED", "HIGH", @@ -11392,7 +11392,7 @@ "type": "string" }, "scope": { - "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope will be checked with `AND` of other resources.", + "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope and will be checked with `AND` of other resources.", "type": "string" }, "sensitiveDataProtectionMapping": { @@ -11400,7 +11400,7 @@ "description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." }, "tagValues": { - "description": "Required. Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", + "description": "Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", "items": { "type": "string" }, @@ -13375,7 +13375,7 @@ "description": "Provides the path to the resource within the resource hierarchy." }, "resourcePathString": { - "description": "A string representation of the resource path. For Google Cloud, it has the format of org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id} where there can be any number of folders. For AWS, it has the format of org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", + "description": "A string representation of the resource path. For Google Cloud, it has the format of `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id}` where there can be any number of folders. For AWS, it has the format of `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id}` where there can be any number of organizational units. For Azure, it has the format of `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name}` where there can be any number of management groups.", "type": "string" }, "service": { diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index b862a03b00c..dd8db9e47f2 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -4921,7 +4921,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // creation. CreateTime string `json:"createTime,omitempty"` // Dataset: The dataset to write findings' updates to. Its format is - // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset + // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery dataset // unique ID must contain only letters (a-z, A-Z), numbers (0-9), or // underscores (_). Dataset string `json:"dataset,omitempty"` @@ -4942,7 +4942,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // BigQuery export. This field is set by the server and will be ignored if // provided on export creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: The relative resource name of this export. See: + // Name: Identifier. The relative resource name of this export. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name. // The following list shows some examples: + // `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{exp @@ -6661,8 +6661,8 @@ type GoogleCloudSecuritycenterV2MuteConfig struct { // mute config. This field is set by the server and will be ignored if provided // on config creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: This field will be ignored if provided on config creation. The - // following list shows some examples of the format: + + // Name: Identifier. This field will be ignored if provided on config creation. + // The following list shows some examples of the format: + // `organizations/{organization}/muteConfigs/{mute_config}` + // `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` // + `folders/{folder}/muteConfigs/{mute_config}` + @@ -7244,7 +7244,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { CreateTime string `json:"createTime,omitempty"` // Description: Description of the resource value configuration. Description string `json:"description,omitempty"` - // Name: Name for the resource value configuration + // Name: Identifier. Name for the resource value configuration Name string `json:"name,omitempty"` // ResourceLabelsSelector: List of resource labels to search for, evaluated // with `AND`. For example, "resource_labels_selector": {"key": "value", "env": @@ -7257,7 +7257,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { // apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. ResourceType string `json:"resourceType,omitempty"` // ResourceValue: Resource value level this expression represents Only required - // when there is no SDP mapping in the request + // when there is no Sensitive Data Protection mapping in the request // // Possible values: // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value @@ -7268,15 +7268,15 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { ResourceValue string `json:"resourceValue,omitempty"` // Scope: Project or folder to scope this configuration to. For example, // "project/456" would apply this configuration only to resources in - // "project/456" scope will be checked with `AND` of other resources. + // "project/456" scope and will be checked with `AND` of other resources. Scope string `json:"scope,omitempty"` // SensitiveDataProtectionMapping: A mapping of the sensitivity on Sensitive // Data Protection finding to resource values. This mapping can only be used in // combination with a resource_type that is related to BigQuery, e.g. // "bigquery.googleapis.com/Dataset". SensitiveDataProtectionMapping *GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping `json:"sensitiveDataProtectionMapping,omitempty"` - // TagValues: Required. Tag values combined with `AND` to check against. Values - // in the form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", + // TagValues: Tag values combined with `AND` to check against. Values in the + // form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", // "tagValues/789" ]` // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing TagValues []string `json:"tagValues,omitempty"` @@ -9769,13 +9769,14 @@ type Resource struct { ResourcePath *ResourcePath `json:"resourcePath,omitempty"` // ResourcePathString: A string representation of the resource path. For Google // Cloud, it has the format of - // org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_ - // id} where there can be any number of folders. For AWS, it has the format of - // org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id} - // /account/{account_id} where there can be any number of organizational units. - // For Azure, it has the format of - // mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_ - // id}/rg/{resource_group_name} where there can be any number of management + // `org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project + // _id}` where there can be any number of folders. For AWS, it has the format + // of + // `org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id + // }/account/{account_id}` where there can be any number of organizational + // units. For Azure, it has the format of + // `mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription + // _id}/rg/{resource_group_name}` where there can be any number of management // groups. ResourcePathString string `json:"resourcePathString,omitempty"` // Service: The service or resource provider associated with the resource. @@ -12008,9 +12009,9 @@ type FoldersEventThreatDetectionSettingsValidateCustomModuleCall struct { // // - parent: Resource name of the parent to validate the Custom Module under. // Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *FoldersEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *FoldersEventThreatDetectionSettingsValidateCustomModuleCall { c := &FoldersEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12116,9 +12117,9 @@ type FoldersEventThreatDetectionSettingsCustomModulesCreateCall struct { // by default. // // - parent: The new custom module's parent. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *FoldersEventThreatDetectionSettingsCustomModulesCreateCall { c := &FoldersEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12222,10 +12223,10 @@ type FoldersEventThreatDetectionSettingsCustomModulesDeleteCall struct { // supported for resident custom modules. // // - name: Name of the custom module to delete. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Delete(name string) *FoldersEventThreatDetectionSettingsCustomModulesDeleteCall { c := &FoldersEventThreatDetectionSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12322,10 +12323,10 @@ type FoldersEventThreatDetectionSettingsCustomModulesGetCall struct { // Get: Gets an Event Threat Detection custom module. // // - name: Name of the custom module to get. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *FoldersEventThreatDetectionSettingsCustomModulesService) Get(name string) *FoldersEventThreatDetectionSettingsCustomModulesGetCall { c := &FoldersEventThreatDetectionSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12436,9 +12437,9 @@ type FoldersEventThreatDetectionSettingsCustomModulesListCall struct { // parent along with modules inherited from ancestors. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *FoldersEventThreatDetectionSettingsCustomModulesService) List(parent string) *FoldersEventThreatDetectionSettingsCustomModulesListCall { c := &FoldersEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12588,9 +12589,9 @@ type FoldersEventThreatDetectionSettingsCustomModulesListDescendantCall struct { // under the given Resource Manager parent and its descendants. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *FoldersEventThreatDetectionSettingsCustomModulesService) ListDescendant(parent string) *FoldersEventThreatDetectionSettingsCustomModulesListDescendantCall { c := &FoldersEventThreatDetectionSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -12860,12 +12861,12 @@ type FoldersEventThreatDetectionSettingsEffectiveCustomModulesGetCall struct { // // - name: The resource name of the effective Event Threat Detection custom // module. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM -// odules/{module}". * -// "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu -// le}". * -// "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo -// dule}". +// `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM +// odules/{module}`. * +// `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu +// le}`. * +// `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo +// dule}`. func (r *FoldersEventThreatDetectionSettingsEffectiveCustomModulesService) Get(name string) *FoldersEventThreatDetectionSettingsEffectiveCustomModulesGetCall { c := &FoldersEventThreatDetectionSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -12976,9 +12977,9 @@ type FoldersEventThreatDetectionSettingsEffectiveCustomModulesListCall struct { // parent along with modules inherited from its ancestors. // // - parent: Name of the parent to list custom modules for. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *FoldersEventThreatDetectionSettingsEffectiveCustomModulesService) List(parent string) *FoldersEventThreatDetectionSettingsEffectiveCustomModulesListCall { c := &FoldersEventThreatDetectionSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -18630,9 +18631,9 @@ type OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall struct { // // - parent: Resource name of the parent to validate the Custom Module under. // Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *OrganizationsEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall { c := &OrganizationsEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -18738,9 +18739,9 @@ type OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall struct { // by default. // // - parent: The new custom module's parent. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall { c := &OrganizationsEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -18844,10 +18845,10 @@ type OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall struct { // supported for resident custom modules. // // - name: Name of the custom module to delete. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Delete(name string) *OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall { c := &OrganizationsEventThreatDetectionSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -18944,10 +18945,10 @@ type OrganizationsEventThreatDetectionSettingsCustomModulesGetCall struct { // Get: Gets an Event Threat Detection custom module. // // - name: Name of the custom module to get. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) Get(name string) *OrganizationsEventThreatDetectionSettingsCustomModulesGetCall { c := &OrganizationsEventThreatDetectionSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -19058,9 +19059,9 @@ type OrganizationsEventThreatDetectionSettingsCustomModulesListCall struct { // parent along with modules inherited from ancestors. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) List(parent string) *OrganizationsEventThreatDetectionSettingsCustomModulesListCall { c := &OrganizationsEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -19210,9 +19211,9 @@ type OrganizationsEventThreatDetectionSettingsCustomModulesListDescendantCall st // under the given Resource Manager parent and its descendants. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *OrganizationsEventThreatDetectionSettingsCustomModulesService) ListDescendant(parent string) *OrganizationsEventThreatDetectionSettingsCustomModulesListDescendantCall { c := &OrganizationsEventThreatDetectionSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -19482,12 +19483,12 @@ type OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesGetCall stru // // - name: The resource name of the effective Event Threat Detection custom // module. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM -// odules/{module}". * -// "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu -// le}". * -// "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo -// dule}". +// `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM +// odules/{module}`. * +// `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu +// le}`. * +// `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo +// dule}`. func (r *OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesService) Get(name string) *OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesGetCall { c := &OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -19598,9 +19599,9 @@ type OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesListCall str // parent along with modules inherited from its ancestors. // // - parent: Name of the parent to list custom modules for. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesService) List(parent string) *OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesListCall { c := &OrganizationsEventThreatDetectionSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27740,9 +27741,9 @@ type ProjectsEventThreatDetectionSettingsValidateCustomModuleCall struct { // // - parent: Resource name of the parent to validate the Custom Module under. // Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *ProjectsEventThreatDetectionSettingsService) ValidateCustomModule(parent string, validateeventthreatdetectioncustommodulerequest *ValidateEventThreatDetectionCustomModuleRequest) *ProjectsEventThreatDetectionSettingsValidateCustomModuleCall { c := &ProjectsEventThreatDetectionSettingsValidateCustomModuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27848,9 +27849,9 @@ type ProjectsEventThreatDetectionSettingsCustomModulesCreateCall struct { // by default. // // - parent: The new custom module's parent. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Create(parent string, eventthreatdetectioncustommodule *EventThreatDetectionCustomModule) *ProjectsEventThreatDetectionSettingsCustomModulesCreateCall { c := &ProjectsEventThreatDetectionSettingsCustomModulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -27954,10 +27955,10 @@ type ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall struct { // supported for resident custom modules. // // - name: Name of the custom module to delete. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Delete(name string) *ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall { c := &ProjectsEventThreatDetectionSettingsCustomModulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28054,10 +28055,10 @@ type ProjectsEventThreatDetectionSettingsCustomModulesGetCall struct { // Get: Gets an Event Threat Detection custom module. // // - name: Name of the custom module to get. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/customModules/{m -// odule}". * -// "folders/{folder}/eventThreatDetectionSettings/customModules/{module}". * -// "projects/{project}/eventThreatDetectionSettings/customModules/{module}". +// `organizations/{organization}/eventThreatDetectionSettings/customModules/{m +// odule}`. * +// `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`. * +// `projects/{project}/eventThreatDetectionSettings/customModules/{module}`. func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) Get(name string) *ProjectsEventThreatDetectionSettingsCustomModulesGetCall { c := &ProjectsEventThreatDetectionSettingsCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28168,9 +28169,9 @@ type ProjectsEventThreatDetectionSettingsCustomModulesListCall struct { // parent along with modules inherited from ancestors. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) List(parent string) *ProjectsEventThreatDetectionSettingsCustomModulesListCall { c := &ProjectsEventThreatDetectionSettingsCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28320,9 +28321,9 @@ type ProjectsEventThreatDetectionSettingsCustomModulesListDescendantCall struct // under the given Resource Manager parent and its descendants. // // - parent: Name of the parent to list custom modules under. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *ProjectsEventThreatDetectionSettingsCustomModulesService) ListDescendant(parent string) *ProjectsEventThreatDetectionSettingsCustomModulesListDescendantCall { c := &ProjectsEventThreatDetectionSettingsCustomModulesListDescendantCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -28592,12 +28593,12 @@ type ProjectsEventThreatDetectionSettingsEffectiveCustomModulesGetCall struct { // // - name: The resource name of the effective Event Threat Detection custom // module. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM -// odules/{module}". * -// "folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu -// le}". * -// "projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo -// dule}". +// `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomM +// odules/{module}`. * +// `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{modu +// le}`. * +// `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{mo +// dule}`. func (r *ProjectsEventThreatDetectionSettingsEffectiveCustomModulesService) Get(name string) *ProjectsEventThreatDetectionSettingsEffectiveCustomModulesGetCall { c := &ProjectsEventThreatDetectionSettingsEffectiveCustomModulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -28708,9 +28709,9 @@ type ProjectsEventThreatDetectionSettingsEffectiveCustomModulesListCall struct { // parent along with modules inherited from its ancestors. // // - parent: Name of the parent to list custom modules for. Its format is: * -// "organizations/{organization}/eventThreatDetectionSettings". * -// "folders/{folder}/eventThreatDetectionSettings". * -// "projects/{project}/eventThreatDetectionSettings". +// `organizations/{organization}/eventThreatDetectionSettings`. * +// `folders/{folder}/eventThreatDetectionSettings`. * +// `projects/{project}/eventThreatDetectionSettings`. func (r *ProjectsEventThreatDetectionSettingsEffectiveCustomModulesService) List(parent string) *ProjectsEventThreatDetectionSettingsEffectiveCustomModulesListCall { c := &ProjectsEventThreatDetectionSettingsEffectiveCustomModulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 56fe87a05ab..49117579317 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -896,7 +896,7 @@ } } }, - "revision": "20240705", + "revision": "20240720", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -3789,7 +3789,7 @@ "type": "string" }, "dataset": { - "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", + "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", "type": "string" }, "description": { @@ -3806,7 +3806,7 @@ "type": "string" }, "name": { - "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", + "description": "Identifier. The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", "type": "string" }, "principal": { @@ -5482,7 +5482,7 @@ "type": "string" }, "name": { - "description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", + "description": "Identifier. This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", "type": "string" }, "type": { @@ -5970,7 +5970,7 @@ "type": "string" }, "name": { - "description": "Name for the resource value configuration", + "description": "Identifier. Name for the resource value configuration", "type": "string" }, "resourceLabelsSelector": { @@ -5985,7 +5985,7 @@ "type": "string" }, "resourceValue": { - "description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", + "description": "Resource value level this expression represents Only required when there is no Sensitive Data Protection mapping in the request", "enum": [ "RESOURCE_VALUE_UNSPECIFIED", "HIGH", @@ -6003,7 +6003,7 @@ "type": "string" }, "scope": { - "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope will be checked with `AND` of other resources.", + "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope and will be checked with `AND` of other resources.", "type": "string" }, "sensitiveDataProtectionMapping": { @@ -6011,7 +6011,7 @@ "description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." }, "tagValues": { - "description": "Required. Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", + "description": "Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", "items": { "type": "string" }, diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index e0fa7ba2454..d6164c28fbe 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -3932,7 +3932,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // creation. CreateTime string `json:"createTime,omitempty"` // Dataset: The dataset to write findings' updates to. Its format is - // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset + // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery dataset // unique ID must contain only letters (a-z, A-Z), numbers (0-9), or // underscores (_). Dataset string `json:"dataset,omitempty"` @@ -3953,7 +3953,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // BigQuery export. This field is set by the server and will be ignored if // provided on export creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: The relative resource name of this export. See: + // Name: Identifier. The relative resource name of this export. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name. // The following list shows some examples: + // `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{exp @@ -5672,8 +5672,8 @@ type GoogleCloudSecuritycenterV2MuteConfig struct { // mute config. This field is set by the server and will be ignored if provided // on config creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: This field will be ignored if provided on config creation. The - // following list shows some examples of the format: + + // Name: Identifier. This field will be ignored if provided on config creation. + // The following list shows some examples of the format: + // `organizations/{organization}/muteConfigs/{mute_config}` + // `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` // + `folders/{folder}/muteConfigs/{mute_config}` + @@ -6255,7 +6255,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { CreateTime string `json:"createTime,omitempty"` // Description: Description of the resource value configuration. Description string `json:"description,omitempty"` - // Name: Name for the resource value configuration + // Name: Identifier. Name for the resource value configuration Name string `json:"name,omitempty"` // ResourceLabelsSelector: List of resource labels to search for, evaluated // with `AND`. For example, "resource_labels_selector": {"key": "value", "env": @@ -6268,7 +6268,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { // apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. ResourceType string `json:"resourceType,omitempty"` // ResourceValue: Resource value level this expression represents Only required - // when there is no SDP mapping in the request + // when there is no Sensitive Data Protection mapping in the request // // Possible values: // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value @@ -6279,15 +6279,15 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { ResourceValue string `json:"resourceValue,omitempty"` // Scope: Project or folder to scope this configuration to. For example, // "project/456" would apply this configuration only to resources in - // "project/456" scope will be checked with `AND` of other resources. + // "project/456" scope and will be checked with `AND` of other resources. Scope string `json:"scope,omitempty"` // SensitiveDataProtectionMapping: A mapping of the sensitivity on Sensitive // Data Protection finding to resource values. This mapping can only be used in // combination with a resource_type that is related to BigQuery, e.g. // "bigquery.googleapis.com/Dataset". SensitiveDataProtectionMapping *GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping `json:"sensitiveDataProtectionMapping,omitempty"` - // TagValues: Required. Tag values combined with `AND` to check against. Values - // in the form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", + // TagValues: Tag values combined with `AND` to check against. Values in the + // form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", // "tagValues/789" ]` // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing TagValues []string `json:"tagValues,omitempty"` diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index 829cd706e01..53306962d40 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -292,7 +292,7 @@ ], "parameters": { "name": { - "description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", + "description": "Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", "location": "path", "pattern": "^folders/[^/]+/containerThreatDetectionSettings$", "required": true, @@ -326,7 +326,7 @@ ], "parameters": { "name": { - "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + "description": "Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", "location": "path", "pattern": "^folders/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -394,7 +394,7 @@ ], "parameters": { "name": { - "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + "description": "Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", "location": "path", "pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", "required": true, @@ -428,7 +428,7 @@ ], "parameters": { "name": { - "description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", + "description": "Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", "location": "path", "pattern": "^folders/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, @@ -462,7 +462,7 @@ ], "parameters": { "name": { - "description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", + "description": "Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", "location": "path", "pattern": "^folders/[^/]+/webSecurityScannerSettings$", "required": true, @@ -876,7 +876,7 @@ ], "parameters": { "name": { - "description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", + "description": "Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", "location": "path", "pattern": "^organizations/[^/]+/containerThreatDetectionSettings$", "required": true, @@ -910,7 +910,7 @@ ], "parameters": { "name": { - "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + "description": "Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", "location": "path", "pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -978,7 +978,7 @@ ], "parameters": { "name": { - "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + "description": "Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", "location": "path", "pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", "required": true, @@ -1012,7 +1012,7 @@ ], "parameters": { "name": { - "description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", + "description": "Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", "location": "path", "pattern": "^organizations/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, @@ -1046,7 +1046,7 @@ ], "parameters": { "name": { - "description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", + "description": "Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", "location": "path", "pattern": "^organizations/[^/]+/webSecurityScannerSettings$", "required": true, @@ -1435,7 +1435,7 @@ ], "parameters": { "name": { - "description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", + "description": "Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", "location": "path", "pattern": "^projects/[^/]+/containerThreatDetectionSettings$", "required": true, @@ -1469,7 +1469,7 @@ ], "parameters": { "name": { - "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + "description": "Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", "location": "path", "pattern": "^projects/[^/]+/eventThreatDetectionSettings$", "required": true, @@ -1537,7 +1537,7 @@ ], "parameters": { "name": { - "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + "description": "Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", "location": "path", "pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", "required": true, @@ -1571,7 +1571,7 @@ ], "parameters": { "name": { - "description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", + "description": "Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", "location": "path", "pattern": "^projects/[^/]+/virtualMachineThreatDetectionSettings$", "required": true, @@ -1605,7 +1605,7 @@ ], "parameters": { "name": { - "description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", + "description": "Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", "location": "path", "pattern": "^projects/[^/]+/webSecurityScannerSettings$", "required": true, @@ -1728,7 +1728,7 @@ ], "parameters": { "name": { - "description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", + "description": "Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/containerThreatDetectionSettings$", "required": true, @@ -1906,7 +1906,7 @@ } } }, - "revision": "20240705", + "revision": "20240720", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -2599,11 +2599,11 @@ "additionalProperties": { "$ref": "Config" }, - "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's configuration.", "type": "object" }, "name": { - "description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", + "description": "Identifier. The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", "type": "string" }, "serviceAccount": { @@ -2969,11 +2969,11 @@ "additionalProperties": { "$ref": "Config" }, - "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's configuration.", "type": "object" }, "name": { - "description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", + "description": "Identifier. The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", "type": "string" }, "serviceEnablementState": { @@ -4702,7 +4702,7 @@ "type": "string" }, "dataset": { - "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", + "description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", "type": "string" }, "description": { @@ -4719,7 +4719,7 @@ "type": "string" }, "name": { - "description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", + "description": "Identifier. The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", "type": "string" }, "principal": { @@ -6395,7 +6395,7 @@ "type": "string" }, "name": { - "description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", + "description": "Identifier. This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", "type": "string" }, "type": { @@ -6883,7 +6883,7 @@ "type": "string" }, "name": { - "description": "Name for the resource value configuration", + "description": "Identifier. Name for the resource value configuration", "type": "string" }, "resourceLabelsSelector": { @@ -6898,7 +6898,7 @@ "type": "string" }, "resourceValue": { - "description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", + "description": "Resource value level this expression represents Only required when there is no Sensitive Data Protection mapping in the request", "enum": [ "RESOURCE_VALUE_UNSPECIFIED", "HIGH", @@ -6916,7 +6916,7 @@ "type": "string" }, "scope": { - "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope will be checked with `AND` of other resources.", + "description": "Project or folder to scope this configuration to. For example, \"project/456\" would apply this configuration only to resources in \"project/456\" scope and will be checked with `AND` of other resources.", "type": "string" }, "sensitiveDataProtectionMapping": { @@ -6924,7 +6924,7 @@ "description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." }, "tagValues": { - "description": "Required. Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", + "description": "Tag values combined with `AND` to check against. Values in the form \"tagValues/123\" Example: `[ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ]` https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", "items": { "type": "string" }, @@ -8332,11 +8332,11 @@ "additionalProperties": { "$ref": "Config" }, - "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's configuration.", "type": "object" }, "name": { - "description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", + "description": "Identifier. The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", "type": "string" }, "serviceAccount": { @@ -8590,11 +8590,11 @@ "additionalProperties": { "$ref": "Config" }, - "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's configuration.", "type": "object" }, "name": { - "description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", + "description": "Identifier. The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", "type": "string" }, "serviceAccount": { @@ -8709,11 +8709,11 @@ "additionalProperties": { "$ref": "Config" }, - "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", + "description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's configuration.", "type": "object" }, "name": { - "description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", + "description": "Identifier. The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", "type": "string" }, "serviceEnablementState": { diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 0825b73c443..c0be2d81069 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -1360,10 +1360,10 @@ func (s Container) MarshalJSON() ([]byte, error) { type ContainerThreatDetectionSettings struct { // Modules: The configurations including the state of enablement for the // service's different modules. The absence of a module in the map implies its - // configuration is inherited from its parent's. + // configuration is inherited from its parent's configuration. Modules map[string]Config `json:"modules,omitempty"` - // Name: The resource name of the ContainerThreatDetectionSettings. Formats: * - // organizations/{organization}/containerThreatDetectionSettings * + // Name: Identifier. The resource name of the ContainerThreatDetectionSettings. + // Formats: * organizations/{organization}/containerThreatDetectionSettings * // folders/{folder}/containerThreatDetectionSettings * // projects/{project}/containerThreatDetectionSettings * // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDet @@ -1786,10 +1786,10 @@ func (s EnvironmentVariable) MarshalJSON() ([]byte, error) { type EventThreatDetectionSettings struct { // Modules: The configurations including the state of enablement for the // service's different modules. The absence of a module in the map implies its - // configuration is inherited from its parent's. + // configuration is inherited from its parent's configuration. Modules map[string]Config `json:"modules,omitempty"` - // Name: The resource name of the EventThreatDetectionSettings. Formats: * - // organizations/{organization}/eventThreatDetectionSettings * + // Name: Identifier. The resource name of the EventThreatDetectionSettings. + // Formats: * organizations/{organization}/eventThreatDetectionSettings * // folders/{folder}/eventThreatDetectionSettings * // projects/{project}/eventThreatDetectionSettings Name string `json:"name,omitempty"` @@ -3883,7 +3883,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // creation. CreateTime string `json:"createTime,omitempty"` // Dataset: The dataset to write findings' updates to. Its format is - // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery Dataset + // "projects/[project_id]/datasets/[bigquery_dataset_id]". BigQuery dataset // unique ID must contain only letters (a-z, A-Z), numbers (0-9), or // underscores (_). Dataset string `json:"dataset,omitempty"` @@ -3904,7 +3904,7 @@ type GoogleCloudSecuritycenterV2BigQueryExport struct { // BigQuery export. This field is set by the server and will be ignored if // provided on export creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: The relative resource name of this export. See: + // Name: Identifier. The relative resource name of this export. See: // https://cloud.google.com/apis/design/resource_names#relative_resource_name. // The following list shows some examples: + // `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{exp @@ -5623,8 +5623,8 @@ type GoogleCloudSecuritycenterV2MuteConfig struct { // mute config. This field is set by the server and will be ignored if provided // on config creation or update. MostRecentEditor string `json:"mostRecentEditor,omitempty"` - // Name: This field will be ignored if provided on config creation. The - // following list shows some examples of the format: + + // Name: Identifier. This field will be ignored if provided on config creation. + // The following list shows some examples of the format: + // `organizations/{organization}/muteConfigs/{mute_config}` + // `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` // + `folders/{folder}/muteConfigs/{mute_config}` + @@ -6206,7 +6206,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { CreateTime string `json:"createTime,omitempty"` // Description: Description of the resource value configuration. Description string `json:"description,omitempty"` - // Name: Name for the resource value configuration + // Name: Identifier. Name for the resource value configuration Name string `json:"name,omitempty"` // ResourceLabelsSelector: List of resource labels to search for, evaluated // with `AND`. For example, "resource_labels_selector": {"key": "value", "env": @@ -6219,7 +6219,7 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { // apply "HIGH" value only to "storage.googleapis.com/Bucket" resources. ResourceType string `json:"resourceType,omitempty"` // ResourceValue: Resource value level this expression represents Only required - // when there is no SDP mapping in the request + // when there is no Sensitive Data Protection mapping in the request // // Possible values: // "RESOURCE_VALUE_UNSPECIFIED" - Unspecific value @@ -6230,15 +6230,15 @@ type GoogleCloudSecuritycenterV2ResourceValueConfig struct { ResourceValue string `json:"resourceValue,omitempty"` // Scope: Project or folder to scope this configuration to. For example, // "project/456" would apply this configuration only to resources in - // "project/456" scope will be checked with `AND` of other resources. + // "project/456" scope and will be checked with `AND` of other resources. Scope string `json:"scope,omitempty"` // SensitiveDataProtectionMapping: A mapping of the sensitivity on Sensitive // Data Protection finding to resource values. This mapping can only be used in // combination with a resource_type that is related to BigQuery, e.g. // "bigquery.googleapis.com/Dataset". SensitiveDataProtectionMapping *GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping `json:"sensitiveDataProtectionMapping,omitempty"` - // TagValues: Required. Tag values combined with `AND` to check against. Values - // in the form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", + // TagValues: Tag values combined with `AND` to check against. Values in the + // form "tagValues/123" Example: `[ "tagValues/123", "tagValues/456", // "tagValues/789" ]` // https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing TagValues []string `json:"tagValues,omitempty"` @@ -7778,10 +7778,10 @@ func (s SecurityCenterSettings) MarshalJSON() ([]byte, error) { type SecurityHealthAnalyticsSettings struct { // Modules: The configurations including the state of enablement for the // service's different modules. The absence of a module in the map implies its - // configuration is inherited from its parent's. + // configuration is inherited from its parent's configuration. Modules map[string]Config `json:"modules,omitempty"` - // Name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * - // organizations/{organization}/securityHealthAnalyticsSettings * + // Name: Identifier. The resource name of the SecurityHealthAnalyticsSettings. + // Formats: * organizations/{organization}/securityHealthAnalyticsSettings * // folders/{folder}/securityHealthAnalyticsSettings * // projects/{project}/securityHealthAnalyticsSettings Name string `json:"name,omitempty"` @@ -8131,10 +8131,10 @@ func (s *ToxicCombination) UnmarshalJSON(data []byte) error { type VirtualMachineThreatDetectionSettings struct { // Modules: The configurations including the state of enablement for the // service's different modules. The absence of a module in the map implies its - // configuration is inherited from its parent's. + // configuration is inherited from its parent's configuration. Modules map[string]Config `json:"modules,omitempty"` - // Name: The resource name of the VirtualMachineThreatDetectionSettings. - // Formats: * + // Name: Identifier. The resource name of the + // VirtualMachineThreatDetectionSettings. Formats: * // organizations/{organization}/virtualMachineThreatDetectionSettings * // folders/{folder}/virtualMachineThreatDetectionSettings * // projects/{project}/virtualMachineThreatDetectionSettings @@ -8268,10 +8268,10 @@ func (s VulnerabilitySnapshot) MarshalJSON() ([]byte, error) { type WebSecurityScannerSettings struct { // Modules: The configurations including the state of enablement for the // service's different modules. The absence of a module in the map implies its - // configuration is inherited from its parent's. + // configuration is inherited from its parent's configuration. Modules map[string]Config `json:"modules,omitempty"` - // Name: The resource name of the WebSecurityScannerSettings. Formats: * - // organizations/{organization}/webSecurityScannerSettings * + // Name: Identifier. The resource name of the WebSecurityScannerSettings. + // Formats: * organizations/{organization}/webSecurityScannerSettings * // folders/{folder}/webSecurityScannerSettings * // projects/{project}/webSecurityScannerSettings Name string `json:"name,omitempty"` @@ -9162,8 +9162,9 @@ type FoldersUpdateContainerThreatDetectionSettingsCall struct { // UpdateContainerThreatDetectionSettings: Update the // ContainerThreatDetectionSettings resource. // -// - name: The resource name of the ContainerThreatDetectionSettings. Formats: -// - organizations/{organization}/containerThreatDetectionSettings * +// - name: Identifier. The resource name of the +// ContainerThreatDetectionSettings. Formats: * +// organizations/{organization}/containerThreatDetectionSettings * // folders/{folder}/containerThreatDetectionSettings * // projects/{project}/containerThreatDetectionSettings * // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD @@ -9277,8 +9278,8 @@ type FoldersUpdateEventThreatDetectionSettingsCall struct { // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings // resource. // -// - name: The resource name of the EventThreatDetectionSettings. Formats: * -// organizations/{organization}/eventThreatDetectionSettings * +// - name: Identifier. The resource name of the EventThreatDetectionSettings. +// Formats: * organizations/{organization}/eventThreatDetectionSettings * // folders/{folder}/eventThreatDetectionSettings * // projects/{project}/eventThreatDetectionSettings. func (r *FoldersService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *FoldersUpdateEventThreatDetectionSettingsCall { @@ -9504,7 +9505,8 @@ type FoldersUpdateSecurityHealthAnalyticsSettingsCall struct { // UpdateSecurityHealthAnalyticsSettings: Update the // SecurityHealthAnalyticsSettings resource. // -// - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * +// - name: Identifier. The resource name of the +// SecurityHealthAnalyticsSettings. Formats: * // organizations/{organization}/securityHealthAnalyticsSettings * // folders/{folder}/securityHealthAnalyticsSettings * // projects/{project}/securityHealthAnalyticsSettings. @@ -9617,8 +9619,8 @@ type FoldersUpdateVirtualMachineThreatDetectionSettingsCall struct { // UpdateVirtualMachineThreatDetectionSettings: Update the // VirtualMachineThreatDetectionSettings resource. // -// - name: The resource name of the VirtualMachineThreatDetectionSettings. -// Formats: * +// - name: Identifier. The resource name of the +// VirtualMachineThreatDetectionSettings. Formats: * // organizations/{organization}/virtualMachineThreatDetectionSettings * // folders/{folder}/virtualMachineThreatDetectionSettings * // projects/{project}/virtualMachineThreatDetectionSettings. @@ -9731,8 +9733,8 @@ type FoldersUpdateWebSecurityScannerSettingsCall struct { // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings // resource. // -// - name: The resource name of the WebSecurityScannerSettings. Formats: * -// organizations/{organization}/webSecurityScannerSettings * +// - name: Identifier. The resource name of the WebSecurityScannerSettings. +// Formats: * organizations/{organization}/webSecurityScannerSettings * // folders/{folder}/webSecurityScannerSettings * // projects/{project}/webSecurityScannerSettings. func (r *FoldersService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *FoldersUpdateWebSecurityScannerSettingsCall { @@ -11478,8 +11480,9 @@ type OrganizationsUpdateContainerThreatDetectionSettingsCall struct { // UpdateContainerThreatDetectionSettings: Update the // ContainerThreatDetectionSettings resource. // -// - name: The resource name of the ContainerThreatDetectionSettings. Formats: -// - organizations/{organization}/containerThreatDetectionSettings * +// - name: Identifier. The resource name of the +// ContainerThreatDetectionSettings. Formats: * +// organizations/{organization}/containerThreatDetectionSettings * // folders/{folder}/containerThreatDetectionSettings * // projects/{project}/containerThreatDetectionSettings * // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD @@ -11593,8 +11596,8 @@ type OrganizationsUpdateEventThreatDetectionSettingsCall struct { // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings // resource. // -// - name: The resource name of the EventThreatDetectionSettings. Formats: * -// organizations/{organization}/eventThreatDetectionSettings * +// - name: Identifier. The resource name of the EventThreatDetectionSettings. +// Formats: * organizations/{organization}/eventThreatDetectionSettings * // folders/{folder}/eventThreatDetectionSettings * // projects/{project}/eventThreatDetectionSettings. func (r *OrganizationsService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *OrganizationsUpdateEventThreatDetectionSettingsCall { @@ -11820,7 +11823,8 @@ type OrganizationsUpdateSecurityHealthAnalyticsSettingsCall struct { // UpdateSecurityHealthAnalyticsSettings: Update the // SecurityHealthAnalyticsSettings resource. // -// - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * +// - name: Identifier. The resource name of the +// SecurityHealthAnalyticsSettings. Formats: * // organizations/{organization}/securityHealthAnalyticsSettings * // folders/{folder}/securityHealthAnalyticsSettings * // projects/{project}/securityHealthAnalyticsSettings. @@ -11933,8 +11937,8 @@ type OrganizationsUpdateVirtualMachineThreatDetectionSettingsCall struct { // UpdateVirtualMachineThreatDetectionSettings: Update the // VirtualMachineThreatDetectionSettings resource. // -// - name: The resource name of the VirtualMachineThreatDetectionSettings. -// Formats: * +// - name: Identifier. The resource name of the +// VirtualMachineThreatDetectionSettings. Formats: * // organizations/{organization}/virtualMachineThreatDetectionSettings * // folders/{folder}/virtualMachineThreatDetectionSettings * // projects/{project}/virtualMachineThreatDetectionSettings. @@ -12047,8 +12051,8 @@ type OrganizationsUpdateWebSecurityScannerSettingsCall struct { // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings // resource. // -// - name: The resource name of the WebSecurityScannerSettings. Formats: * -// organizations/{organization}/webSecurityScannerSettings * +// - name: Identifier. The resource name of the WebSecurityScannerSettings. +// Formats: * organizations/{organization}/webSecurityScannerSettings * // folders/{folder}/webSecurityScannerSettings * // projects/{project}/webSecurityScannerSettings. func (r *OrganizationsService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *OrganizationsUpdateWebSecurityScannerSettingsCall { @@ -13686,8 +13690,9 @@ type ProjectsUpdateContainerThreatDetectionSettingsCall struct { // UpdateContainerThreatDetectionSettings: Update the // ContainerThreatDetectionSettings resource. // -// - name: The resource name of the ContainerThreatDetectionSettings. Formats: -// - organizations/{organization}/containerThreatDetectionSettings * +// - name: Identifier. The resource name of the +// ContainerThreatDetectionSettings. Formats: * +// organizations/{organization}/containerThreatDetectionSettings * // folders/{folder}/containerThreatDetectionSettings * // projects/{project}/containerThreatDetectionSettings * // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD @@ -13801,8 +13806,8 @@ type ProjectsUpdateEventThreatDetectionSettingsCall struct { // UpdateEventThreatDetectionSettings: Update the EventThreatDetectionSettings // resource. // -// - name: The resource name of the EventThreatDetectionSettings. Formats: * -// organizations/{organization}/eventThreatDetectionSettings * +// - name: Identifier. The resource name of the EventThreatDetectionSettings. +// Formats: * organizations/{organization}/eventThreatDetectionSettings * // folders/{folder}/eventThreatDetectionSettings * // projects/{project}/eventThreatDetectionSettings. func (r *ProjectsService) UpdateEventThreatDetectionSettings(name string, eventthreatdetectionsettings *EventThreatDetectionSettings) *ProjectsUpdateEventThreatDetectionSettingsCall { @@ -14028,7 +14033,8 @@ type ProjectsUpdateSecurityHealthAnalyticsSettingsCall struct { // UpdateSecurityHealthAnalyticsSettings: Update the // SecurityHealthAnalyticsSettings resource. // -// - name: The resource name of the SecurityHealthAnalyticsSettings. Formats: * +// - name: Identifier. The resource name of the +// SecurityHealthAnalyticsSettings. Formats: * // organizations/{organization}/securityHealthAnalyticsSettings * // folders/{folder}/securityHealthAnalyticsSettings * // projects/{project}/securityHealthAnalyticsSettings. @@ -14141,8 +14147,8 @@ type ProjectsUpdateVirtualMachineThreatDetectionSettingsCall struct { // UpdateVirtualMachineThreatDetectionSettings: Update the // VirtualMachineThreatDetectionSettings resource. // -// - name: The resource name of the VirtualMachineThreatDetectionSettings. -// Formats: * +// - name: Identifier. The resource name of the +// VirtualMachineThreatDetectionSettings. Formats: * // organizations/{organization}/virtualMachineThreatDetectionSettings * // folders/{folder}/virtualMachineThreatDetectionSettings * // projects/{project}/virtualMachineThreatDetectionSettings. @@ -14255,8 +14261,8 @@ type ProjectsUpdateWebSecurityScannerSettingsCall struct { // UpdateWebSecurityScannerSettings: Update the WebSecurityScannerSettings // resource. // -// - name: The resource name of the WebSecurityScannerSettings. Formats: * -// organizations/{organization}/webSecurityScannerSettings * +// - name: Identifier. The resource name of the WebSecurityScannerSettings. +// Formats: * organizations/{organization}/webSecurityScannerSettings * // folders/{folder}/webSecurityScannerSettings * // projects/{project}/webSecurityScannerSettings. func (r *ProjectsService) UpdateWebSecurityScannerSettings(name string, websecurityscannersettings *WebSecurityScannerSettings) *ProjectsUpdateWebSecurityScannerSettingsCall { @@ -14724,8 +14730,9 @@ type ProjectsLocationsClustersUpdateContainerThreatDetectionSettingsCall struct // UpdateContainerThreatDetectionSettings: Update the // ContainerThreatDetectionSettings resource. // -// - name: The resource name of the ContainerThreatDetectionSettings. Formats: -// - organizations/{organization}/containerThreatDetectionSettings * +// - name: Identifier. The resource name of the +// ContainerThreatDetectionSettings. Formats: * +// organizations/{organization}/containerThreatDetectionSettings * // folders/{folder}/containerThreatDetectionSettings * // projects/{project}/containerThreatDetectionSettings * // projects/{project}/locations/{location}/clusters/{cluster}/containerThreatD diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index 98026b8ce15..e76d022a536 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -542,7 +542,7 @@ } } }, - "revision": "20240707", + "revision": "20240712", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1003,14 +1003,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1126,7 +1126,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -1495,7 +1495,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index 9b7b2d14cbc..487fe7883d0 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -885,9 +885,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1098,20 +1100,17 @@ func (s DeleteTenantProjectRequest) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -1652,9 +1651,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 412c6c1962d..76077c2429b 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -715,7 +715,7 @@ } } }, - "revision": "20240707", + "revision": "20240712", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -1110,14 +1110,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1211,7 +1211,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -1580,7 +1580,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 1a8d6fa2a5f..2b9982d3552 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -808,9 +808,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -969,20 +971,17 @@ func (s CustomHttpPattern) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -1521,9 +1520,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index c0249ad5726..82436b9af72 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20240628", + "revision": "20240712", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1427,14 +1427,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1561,7 +1561,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -2043,7 +2043,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 3c1b69a84f2..69885504296 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -1186,9 +1186,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1382,20 +1384,17 @@ func (s Diagnostic) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -2125,9 +2124,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/servicenetworking/v1/servicenetworking-api.json b/servicenetworking/v1/servicenetworking-api.json index d202dc5e93c..5249f3a86ad 100644 --- a/servicenetworking/v1/servicenetworking-api.json +++ b/servicenetworking/v1/servicenetworking-api.json @@ -1029,7 +1029,7 @@ } } }, - "revision": "20240626", + "revision": "20240716", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -1765,14 +1765,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1957,7 +1957,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -2421,7 +2421,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/servicenetworking/v1/servicenetworking-gen.go b/servicenetworking/v1/servicenetworking-gen.go index 13ad8882f16..282a20fb4d1 100644 --- a/servicenetworking/v1/servicenetworking-gen.go +++ b/servicenetworking/v1/servicenetworking-gen.go @@ -1327,9 +1327,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1639,20 +1641,17 @@ func (s DnsZonePair) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -2348,9 +2347,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/servicenetworking/v1beta/servicenetworking-api.json b/servicenetworking/v1beta/servicenetworking-api.json index 196095705cd..14b899f551c 100644 --- a/servicenetworking/v1beta/servicenetworking-api.json +++ b/servicenetworking/v1beta/servicenetworking-api.json @@ -307,7 +307,7 @@ } } }, - "revision": "20240626", + "revision": "20240716", "rootUrl": "https://servicenetworking.googleapis.com/", "schemas": { "AddDnsRecordSetMetadata": { @@ -918,14 +918,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1073,7 +1073,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -1505,7 +1505,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/servicenetworking/v1beta/servicenetworking-gen.go b/servicenetworking/v1beta/servicenetworking-gen.go index d70f04e9b77..47a1bff9827 100644 --- a/servicenetworking/v1beta/servicenetworking-gen.go +++ b/servicenetworking/v1beta/servicenetworking-gen.go @@ -1039,9 +1039,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1270,20 +1272,17 @@ func (s DnsZone) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -1916,9 +1915,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/serviceusage/v1/serviceusage-api.json b/serviceusage/v1/serviceusage-api.json index fc692bcff94..74e89d1c2a2 100644 --- a/serviceusage/v1/serviceusage-api.json +++ b/serviceusage/v1/serviceusage-api.json @@ -426,7 +426,7 @@ } } }, - "revision": "20240707", + "revision": "20240712", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -998,14 +998,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1147,7 +1147,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -1971,7 +1971,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceusage/v1/serviceusage-gen.go b/serviceusage/v1/serviceusage-gen.go index 800b4d52208..7010ee5af38 100644 --- a/serviceusage/v1/serviceusage-gen.go +++ b/serviceusage/v1/serviceusage-gen.go @@ -1023,9 +1023,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1257,20 +1259,17 @@ func (s DisableServiceResponse) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -2317,9 +2316,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/serviceusage/v1beta1/serviceusage-api.json b/serviceusage/v1beta1/serviceusage-api.json index a7fbc2c4dc6..6eb28168259 100644 --- a/serviceusage/v1beta1/serviceusage-api.json +++ b/serviceusage/v1beta1/serviceusage-api.json @@ -964,7 +964,7 @@ } } }, - "revision": "20240707", + "revision": "20240712", "rootUrl": "https://serviceusage.googleapis.com/", "schemas": { "AddEnableRulesMetadata": { @@ -1594,14 +1594,14 @@ "type": "array" }, "provided": { - "description": "A list of full type names of provided contexts.", + "description": "A list of full type names of provided contexts. It is used to support propagating HTTP headers and ETags from the response extension.", "items": { "type": "string" }, "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", + "description": "A list of full type names of requested contexts, only the requested context will be made available to the backend.", "items": { "type": "string" }, @@ -1724,7 +1724,7 @@ "type": "object" }, "Documentation": { - "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... code_snippet_rules: - selector: google.calendar.Calendar.Delete code_snippets: - includes: - github_include: region_tag: calendar_delete code_language: JAVA account: GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", + "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { "documentationRootUrl": { @@ -2548,7 +2548,7 @@ "type": "object" }, "HttpRule": { - "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example below selects a gRPC method and applies HttpRule to it. http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", + "description": "gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: - HTTP: `GET /v1/messages/123456?revision=2\u0026sub.subfield=foo` - gRPC: `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A\u0026param=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A\u0026foo.b=B\u0026foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: - HTTP: `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` - gRPC: `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: - HTTP: `GET /v1/messages/123456` - gRPC: `GetMessage(message_id: \"123456\")` - HTTP: `GET /v1/users/me/messages/123456` - gRPC: `GetMessage(user_id: \"me\" message_id: \"123456\")` Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. The following example selects a gRPC method and applies an `HttpRule` to it: http: rules: - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", "id": "HttpRule", "properties": { "additionalBindings": { diff --git a/serviceusage/v1beta1/serviceusage-gen.go b/serviceusage/v1beta1/serviceusage-gen.go index 8fda91d8e75..32fe10cf515 100644 --- a/serviceusage/v1beta1/serviceusage-gen.go +++ b/serviceusage/v1beta1/serviceusage-gen.go @@ -1137,9 +1137,11 @@ type ContextRule struct { // AllowedResponseExtensions: A list of full type names or extension IDs of // extensions allowed in grpc side channel from backend to client. AllowedResponseExtensions []string `json:"allowedResponseExtensions,omitempty"` - // Provided: A list of full type names of provided contexts. + // Provided: A list of full type names of provided contexts. It is used to + // support propagating HTTP headers and ETags from the response extension. Provided []string `json:"provided,omitempty"` - // Requested: A list of full type names of requested contexts. + // Requested: A list of full type names of requested contexts, only the + // requested context will be made available to the backend. Requested []string `json:"requested,omitempty"` // Selector: Selects the methods to which this rule applies. Refer to selector // for syntax details. @@ -1338,20 +1340,17 @@ func (s DisableServiceResponse) MarshalJSON() ([]byte, error) { // google/foo/tutorial.md ==) subpages: - name: Java content: (== include // google/foo/tutorial_java.md ==) rules: - selector: // google.calendar.Calendar.Get description: > ... - selector: -// google.calendar.Calendar.Put description: > ... code_snippet_rules: - -// selector: google.calendar.Calendar.Delete code_snippets: - includes: - -// github_include: region_tag: calendar_delete code_language: JAVA account: -// GoogleCloudPlatform project: java-docs-samples file: calendar/delete.java -// Documentation is provided in markdown syntax. In addition to standard -// markdown features, definition lists, tables and fenced code blocks are -// supported. Section headers can be provided and are interpreted relative to -// the section nesting of the context where a documentation fragment is -// embedded. Documentation from the IDL is merged with documentation defined -// via the config at normalization time, where documentation provided by config -// rules overrides IDL provided. A number of constructs specific to the API -// platform are supported in documentation text. In order to reference a proto -// element, the following notation can be used: [fully.qualified.proto.name][] -// To override the display text used for the link, this can be used: [display +// google.calendar.Calendar.Put description: > ... Documentation is provided in +// markdown syntax. In addition to standard markdown features, definition +// lists, tables and fenced code blocks are supported. Section headers can be +// provided and are interpreted relative to the section nesting of the context +// where a documentation fragment is embedded. Documentation from the IDL is +// merged with documentation defined via the config at normalization time, +// where documentation provided by config rules overrides IDL provided. A +// number of constructs specific to the API platform are supported in +// documentation text. In order to reference a proto element, the following +// notation can be used: [fully.qualified.proto.name][] To override the display +// text used for the link, this can be used: [display // text][fully.qualified.proto.name] Text can be excluded from doc using the // following notation: (-- internal comment --) A few directives are available // in documentation. Note that directives must appear on a single line to be @@ -2393,9 +2392,9 @@ func (s Http) MarshalJSON() ([]byte, error) { // to a REST endpoint, achieving the same effect as the proto annotation. This // can be particularly useful if you have a proto that is reused in multiple // services. Note that any transcoding specified in the service config will -// override any matching transcoding configuration in the proto. Example below -// selects a gRPC method and applies HttpRule to it. http: rules: - selector: -// example.v1.Messaging.GetMessage get: +// override any matching transcoding configuration in the proto. The following +// example selects a gRPC method and applies an `HttpRule` to it: http: rules: +// - selector: example.v1.Messaging.GetMessage get: // /v1/messages/{message_id}/{sub.subfield} Special notes When gRPC Transcoding // is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion // must follow the proto3 specification diff --git a/sheets/v4/sheets-api.json b/sheets/v4/sheets-api.json index 694de87af9d..1d53fd108de 100644 --- a/sheets/v4/sheets-api.json +++ b/sheets/v4/sheets-api.json @@ -870,7 +870,7 @@ } } }, - "revision": "20240708", + "revision": "20240716", "rootUrl": "https://sheets.googleapis.com/", "schemas": { "AddBandingRequest": { @@ -3699,6 +3699,10 @@ "$ref": "BigQueryDataSourceSpec", "description": "A BigQueryDataSourceSpec." }, + "looker": { + "$ref": "LookerDataSourceSpec", + "description": "A LookerDatasourceSpec." + }, "parameters": { "description": "The parameters of the data source, used when querying the data source.", "items": { @@ -5123,6 +5127,25 @@ }, "type": "object" }, + "LookerDataSourceSpec": { + "description": "The specification of a Looker data source.", + "id": "LookerDataSourceSpec", + "properties": { + "explore": { + "description": "Name of a LookerML model explore.", + "type": "string" + }, + "instanceUri": { + "description": "A Looker instance URL.", + "type": "string" + }, + "model": { + "description": "Name of a LookerML model.", + "type": "string" + } + }, + "type": "object" + }, "ManualRule": { "description": "Allows you to manually organize the values in a source data column into buckets with names of your choosing. For example, a pivot table that aggregates population by state: +-------+-------------------+ | State | SUM of Population | +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.9 | ... +-------+-------------------+ could be turned into a pivot table that aggregates population by time zone by providing a list of groups (for example, groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule. Note that a similar effect could be achieved by adding a time zone column to the source data and adjusting the pivot table. +-----------+-------------------+ | Time Zone | SUM of Population | +-----------+-------------------+ | Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ... +-----------+-------------------+", "id": "ManualRule", diff --git a/sheets/v4/sheets-gen.go b/sheets/v4/sheets-gen.go index efba295f2b5..46b098129cc 100644 --- a/sheets/v4/sheets-gen.go +++ b/sheets/v4/sheets-gen.go @@ -3991,6 +3991,8 @@ func (s DataSourceSheetProperties) MarshalJSON() ([]byte, error) { type DataSourceSpec struct { // BigQuery: A BigQueryDataSourceSpec. BigQuery *BigQueryDataSourceSpec `json:"bigQuery,omitempty"` + // Looker: A LookerDatasourceSpec. + Looker *LookerDataSourceSpec `json:"looker,omitempty"` // Parameters: The parameters of the data source, used when querying the data // source. Parameters []*DataSourceParameter `json:"parameters,omitempty"` @@ -5979,6 +5981,32 @@ func (s Link) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// LookerDataSourceSpec: The specification of a Looker data source. +type LookerDataSourceSpec struct { + // Explore: Name of a LookerML model explore. + Explore string `json:"explore,omitempty"` + // InstanceUri: A Looker instance URL. + InstanceUri string `json:"instanceUri,omitempty"` + // Model: Name of a LookerML model. + Model string `json:"model,omitempty"` + // ForceSendFields is a list of field names (e.g. "Explore") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Explore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LookerDataSourceSpec) MarshalJSON() ([]byte, error) { + type NoMethod LookerDataSourceSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ManualRule: Allows you to manually organize the values in a source data // column into buckets with names of your choosing. For example, a pivot table // that aggregates population by state: +-------+-------------------+ | State | diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index d290363726d..627c055d578 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1806,6 +1806,92 @@ "resources": { "backupSchedules": { "methods": { + "create": { + "description": "Creates a new backup schedule.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules", + "httpMethod": "POST", + "id": "spanner.projects.instances.databases.backupSchedules.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupScheduleId": { + "description": "Required. The Id to use for the backup schedule. The `backup_schedule_id` appended to `parent` forms the full backup schedule name of the form `projects//instances//databases//backupSchedules/`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The name of the database that this backup schedule applies to.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupSchedules", + "request": { + "$ref": "BackupSchedule" + }, + "response": { + "$ref": "BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "delete": { + "description": "Deletes a backup schedule.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "DELETE", + "id": "spanner.projects.instances.databases.backupSchedules.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the schedule to delete. Values are of the form `projects//instances//databases//backupSchedules/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "get": { + "description": "Gets backup schedule for the input schedule name.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "GET", + "id": "spanner.projects.instances.databases.backupSchedules.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the schedule to retrieve. Values are of the form `projects//instances//databases//backupSchedules/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, "getIamPolicy": { "description": "Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}:getIamPolicy", @@ -1835,6 +1921,78 @@ "https://www.googleapis.com/auth/spanner.admin" ] }, + "list": { + "description": "Lists all the backup schedules for the database.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules", + "httpMethod": "GET", + "id": "spanner.projects.instances.databases.backupSchedules.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Number of backup schedules to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListBackupSchedulesResponse to the same `parent`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Database is the parent resource whose backup schedules should be listed. Values are of the form projects//instances//databases/", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupSchedules", + "response": { + "$ref": "ListBackupSchedulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, + "patch": { + "description": "Updates a backup schedule.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}", + "httpMethod": "PATCH", + "id": "spanner.projects.instances.databases.backupSchedules.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "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.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/backupSchedules/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. A mask specifying which fields in the BackupSchedule resource should be updated. This mask is relative to the BackupSchedule resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "BackupSchedule" + }, + "response": { + "$ref": "BackupSchedule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, "setIamPolicy": { "description": "Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/backupSchedules/{backupSchedulesId}:setIamPolicy", @@ -3096,7 +3254,7 @@ } } }, - "revision": "20240711", + "revision": "20240719", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { @@ -3162,6 +3320,14 @@ "description": "A backup of a Cloud Spanner database.", "id": "Backup", "properties": { + "backupSchedules": { + "description": "Output only. List of backup schedule URIs that are associated with creating this backup. This is only applicable for scheduled backups, and is empty for on-demand backups. To optimize for storage, whenever possible, multiple schedules are collapsed together to create one backup. In such cases, this field captures the list of all backup schedule URIs that are associated with creating this backup. If collapsing is not done, then this field captures the single backup schedule URI associated with creating this backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.", "format": "google-datetime", @@ -3285,6 +3451,51 @@ }, "type": "object" }, + "BackupSchedule": { + "description": "BackupSchedule expresses the automated backup creation specification for a Spanner database. Next ID: 10", + "id": "BackupSchedule", + "properties": { + "encryptionConfig": { + "$ref": "CreateBackupEncryptionConfig", + "description": "Optional. The encryption configuration that will be used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database." + }, + "fullBackupSpec": { + "$ref": "FullBackupSpec", + "description": "The schedule creates only full backups." + }, + "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" + }, + "retentionDuration": { + "description": "Optional. The retention duration of a backup that must be at least 6 hours and at most 366 days. The backup is eligible to be automatically deleted once the retention period has elapsed.", + "format": "google-duration", + "type": "string" + }, + "spec": { + "$ref": "BackupScheduleSpec", + "description": "Optional. The schedule specification based on which the backup creations are triggered." + }, + "updateTime": { + "description": "Output only. The timestamp at which the schedule was last updated. If the schedule has never been updated, this field contains the timestamp when the schedule was first created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupScheduleSpec": { + "description": "Defines specifications of the backup schedule.", + "id": "BackupScheduleSpec", + "properties": { + "cronSpec": { + "$ref": "CrontabSpec", + "description": "Cron style schedule specification." + } + }, + "type": "object" + }, "BatchCreateSessionsRequest": { "description": "The request for BatchCreateSessions.", "id": "BatchCreateSessionsRequest", @@ -3642,6 +3853,40 @@ }, "type": "object" }, + "CreateBackupEncryptionConfig": { + "description": "Encryption configuration for the backup to create.", + "id": "CreateBackupEncryptionConfig", + "properties": { + "encryptionType": { + "description": "Required. The encryption type of the backup.", + "enum": [ + "ENCRYPTION_TYPE_UNSPECIFIED", + "USE_DATABASE_ENCRYPTION", + "GOOGLE_DEFAULT_ENCRYPTION", + "CUSTOMER_MANAGED_ENCRYPTION" + ], + "enumDescriptions": [ + "Unspecified. Do not use.", + "Use the same encryption configuration as the database. This is the default option when encryption_config is empty. For example, if the database is using `Customer_Managed_Encryption`, the backup will be using the same Cloud KMS key as the database.", + "Use Google default encryption.", + "Use customer managed encryption. If specified, `kms_key_name` must contain a valid Cloud KMS key." + ], + "type": "string" + }, + "kmsKeyName": { + "description": "Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", + "type": "string" + }, + "kmsKeyNames": { + "description": "Optional. Specifies the KMS configuration for the one or more keys used to protect the backup. Values are of the form `projects//locations//keyRings//cryptoKeys/`. The keys referenced by kms_key_names must fully cover all regions of the backup's instance configuration. Some examples: * For single region instance configs, specify a single regional location KMS key. * For multi-regional instance configs of type GOOGLE_MANAGED, either specify a multi-regional location KMS key or multiple regional location KMS keys that cover all regions in the instance config. * For an instance config of type USER_MANAGED, please specify only regional location KMS keys to cover each region in the instance config. Multi-regional location KMS keys are not supported for USER_MANAGED instance configs.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "CreateBackupMetadata": { "description": "Metadata type for the operation returned by CreateBackup.", "id": "CreateBackupMetadata", @@ -3864,6 +4109,28 @@ }, "type": "object" }, + "CrontabSpec": { + "description": "CrontabSpec can be used to specify the version time and frequency at which the backup should be created.", + "id": "CrontabSpec", + "properties": { + "creationWindow": { + "description": "Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "text": { + "description": "Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timzeone. The backup will contain an externally consistent copy of the database at the version time. Allowed frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron specifications: * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC. * `0 2 * * * ` : once a day at 2 past midnight in UTC. * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC.", + "type": "string" + }, + "timeZone": { + "description": "Output only. The time zone of the times in `CrontabSpec.text`. Currently only UTC is supported.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "Database": { "description": "A Cloud Spanner database.", "id": "Database", @@ -4347,6 +4614,12 @@ }, "type": "object" }, + "FullBackupSpec": { + "description": "The specification for full backups. A full backup stores the entire contents of the database at a given version time.", + "id": "FullBackupSpec", + "properties": {}, + "type": "object" + }, "GetDatabaseDdlResponse": { "description": "The response for GetDatabaseDdl.", "id": "GetDatabaseDdlResponse", @@ -4925,6 +5198,24 @@ }, "type": "object" }, + "ListBackupSchedulesResponse": { + "description": "The response for ListBackupSchedules.", + "id": "ListBackupSchedulesResponse", + "properties": { + "backupSchedules": { + "description": "The list of backup schedules for a database.", + "items": { + "$ref": "BackupSchedule" + }, + "type": "array" + }, + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent ListBackupSchedules call to fetch more of the schedules.", + "type": "string" + } + }, + "type": "object" + }, "ListBackupsResponse": { "description": "The response for ListBackups.", "id": "ListBackupsResponse", diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index 689cd698f34..7e44d0125ad 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -513,6 +513,15 @@ func (s AutoscalingTargets) MarshalJSON() ([]byte, error) { // Backup: A backup of a Cloud Spanner database. type Backup struct { + // BackupSchedules: Output only. List of backup schedule URIs that are + // associated with creating this backup. This is only applicable for scheduled + // backups, and is empty for on-demand backups. To optimize for storage, + // whenever possible, multiple schedules are collapsed together to create one + // backup. In such cases, this field captures the list of all backup schedule + // URIs that are associated with creating this backup. If collapsing is not + // done, then this field captures the single backup schedule URI associated + // with creating this backup. + BackupSchedules []string `json:"backupSchedules,omitempty"` // CreateTime: Output only. The time the CreateBackup request is received. If // the request does not specify `version_time`, the `version_time` of the // backup will be equivalent to the `create_time`. @@ -594,15 +603,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. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "BackupSchedules") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "BackupSchedules") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -643,6 +652,75 @@ func (s BackupInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackupSchedule: BackupSchedule expresses the automated backup creation +// specification for a Spanner database. Next ID: 10 +type BackupSchedule struct { + // EncryptionConfig: Optional. The encryption configuration that will be used + // to encrypt the backup. If this field is not specified, the backup will use + // the same encryption configuration as the database. + EncryptionConfig *CreateBackupEncryptionConfig `json:"encryptionConfig,omitempty"` + // FullBackupSpec: The schedule creates only full backups. + FullBackupSpec *FullBackupSpec `json:"fullBackupSpec,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 + // 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. + Name string `json:"name,omitempty"` + // RetentionDuration: Optional. The retention duration of a backup that must be + // at least 6 hours and at most 366 days. The backup is eligible to be + // automatically deleted once the retention period has elapsed. + RetentionDuration string `json:"retentionDuration,omitempty"` + // Spec: Optional. The schedule specification based on which the backup + // creations are triggered. + Spec *BackupScheduleSpec `json:"spec,omitempty"` + // UpdateTime: Output only. The timestamp at which the schedule was last + // updated. If the schedule has never been updated, this field contains the + // timestamp when the schedule was first created. + 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. "EncryptionConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EncryptionConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupSchedule) MarshalJSON() ([]byte, error) { + type NoMethod BackupSchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupScheduleSpec: Defines specifications of the backup schedule. +type BackupScheduleSpec struct { + // CronSpec: Cron style schedule specification. + CronSpec *CrontabSpec `json:"cronSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "CronSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CronSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupScheduleSpec) MarshalJSON() ([]byte, error) { + type NoMethod BackupScheduleSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BatchCreateSessionsRequest: The request for BatchCreateSessions. type BatchCreateSessionsRequest struct { // SessionCount: Required. The number of sessions to be created in this batch @@ -1267,6 +1345,57 @@ func (s CopyBackupRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CreateBackupEncryptionConfig: Encryption configuration for the backup to +// create. +type CreateBackupEncryptionConfig struct { + // EncryptionType: Required. The encryption type of the backup. + // + // Possible values: + // "ENCRYPTION_TYPE_UNSPECIFIED" - Unspecified. Do not use. + // "USE_DATABASE_ENCRYPTION" - Use the same encryption configuration as the + // database. This is the default option when encryption_config is empty. For + // example, if the database is using `Customer_Managed_Encryption`, the backup + // will be using the same Cloud KMS key as the database. + // "GOOGLE_DEFAULT_ENCRYPTION" - Use Google default encryption. + // "CUSTOMER_MANAGED_ENCRYPTION" - Use customer managed encryption. If + // specified, `kms_key_name` must contain a valid Cloud KMS key. + EncryptionType string `json:"encryptionType,omitempty"` + // KmsKeyName: Optional. The Cloud KMS key that will be used to protect the + // backup. This field should be set only when encryption_type is + // `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. + KmsKeyName string `json:"kmsKeyName,omitempty"` + // KmsKeyNames: Optional. Specifies the KMS configuration for the one or more + // keys used to protect the backup. Values are of the form + // `projects//locations//keyRings//cryptoKeys/`. The keys referenced by + // kms_key_names must fully cover all regions of the backup's instance + // configuration. Some examples: * For single region instance configs, specify + // a single regional location KMS key. * For multi-regional instance configs of + // type GOOGLE_MANAGED, either specify a multi-regional location KMS key or + // multiple regional location KMS keys that cover all regions in the instance + // config. * For an instance config of type USER_MANAGED, please specify only + // regional location KMS keys to cover each region in the instance config. + // Multi-regional location KMS keys are not supported for USER_MANAGED instance + // configs. + KmsKeyNames []string `json:"kmsKeyNames,omitempty"` + // ForceSendFields is a list of field names (e.g. "EncryptionType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EncryptionType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CreateBackupEncryptionConfig) MarshalJSON() ([]byte, error) { + type NoMethod CreateBackupEncryptionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CreateBackupMetadata: Metadata type for the operation returned by // CreateBackup. type CreateBackupMetadata struct { @@ -1595,6 +1724,49 @@ func (s CreateSessionRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CrontabSpec: CrontabSpec can be used to specify the version time and +// frequency at which the backup should be created. +type CrontabSpec struct { + // CreationWindow: Output only. Schedule backups will contain an externally + // consistent copy of the database at the version time specified in + // `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of + // the scheduled backups at that version time. Spanner will initiate the + // creation of scheduled backups within the time window bounded by the + // version_time specified in `schedule_spec.cron_spec` and version_time + + // `creation_window`. + CreationWindow string `json:"creationWindow,omitempty"` + // Text: Required. Textual representation of the crontab. User can customize + // the backup frequency and the backup version time using the cron expression. + // The version time must be in UTC timzeone. The backup will contain an + // externally consistent copy of the database at the version time. Allowed + // frequencies are 12 hour, 1 day, 1 week and 1 month. Examples of valid cron + // specifications: * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past + // midnight in UTC. * `0 2,14 * * * ` : every 12 hours at (2,14) hours past + // midnight in UTC. * `0 2 * * * ` : once a day at 2 past midnight in UTC. * `0 + // 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * * + // ` : once a month on 8th day at 2 past midnight in UTC. + Text string `json:"text,omitempty"` + // TimeZone: Output only. The time zone of the times in `CrontabSpec.text`. + // Currently only UTC is supported. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreationWindow") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreationWindow") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CrontabSpec) MarshalJSON() ([]byte, error) { + type NoMethod CrontabSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Database: A Cloud Spanner database. type Database struct { // CreateTime: Output only. If exists, the time at which the database creation @@ -2289,6 +2461,11 @@ func (s FreeInstanceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// FullBackupSpec: The specification for full backups. A full backup stores the +// entire contents of the database at a given version time. +type FullBackupSpec struct { +} + // GetDatabaseDdlResponse: The response for GetDatabaseDdl. type GetDatabaseDdlResponse struct { // ProtoDescriptors: Proto descriptors stored in the database. Contains a @@ -3069,6 +3246,34 @@ func (s ListBackupOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListBackupSchedulesResponse: The response for ListBackupSchedules. +type ListBackupSchedulesResponse struct { + // BackupSchedules: The list of backup schedules for a database. + BackupSchedules []*BackupSchedule `json:"backupSchedules,omitempty"` + // NextPageToken: `next_page_token` can be sent in a subsequent + // ListBackupSchedules call to fetch more of the schedules. + 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. "BackupSchedules") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupSchedules") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupSchedulesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupSchedulesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListBackupsResponse: The response for ListBackups. type ListBackupsResponse struct { // Backups: The list of matching backups. Backups returned are ordered by @@ -12447,65 +12652,67 @@ func (c *ProjectsInstancesDatabasesUpdateDdlCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall struct { - s *Service - resource string - getiampolicyrequest *GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsInstancesDatabasesBackupSchedulesCreateCall struct { + s *Service + parent string + backupschedule *BackupSchedule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a database or backup -// resource. Returns an empty policy if a database or backup exists but does -// not have a policy set. Authorization requires -// `spanner.databases.getIamPolicy` permission on resource. For backups, -// authorization requires `spanner.backups.getIamPolicy` permission on -// resource. +// Create: Creates a new backup schedule. // -// - resource: REQUIRED: The Cloud Spanner resource for which the policy is -// being retrieved. The format is `projects//instances/` for instance -// resources and `projects//instances//databases/` for database resources. -func (r *ProjectsInstancesDatabasesBackupSchedulesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { - c := &ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.getiampolicyrequest = getiampolicyrequest +// - parent: The name of the database that this backup schedule applies to. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) Create(parent string, backupschedule *BackupSchedule) *ProjectsInstancesDatabasesBackupSchedulesCreateCall { + c := &ProjectsInstancesDatabasesBackupSchedulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.backupschedule = backupschedule + return c +} + +// BackupScheduleId sets the optional parameter "backupScheduleId": Required. +// The Id to use for the backup schedule. The `backup_schedule_id` appended to +// `parent` forms the full backup schedule name of the form +// `projects//instances//databases//backupSchedules/`. +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) BackupScheduleId(backupScheduleId string) *ProjectsInstancesDatabasesBackupSchedulesCreateCall { + c.urlParams_.Set("backupScheduleId", backupScheduleId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) 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) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupschedule) 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/{+parent}/backupSchedules") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12513,17 +12720,113 @@ func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) doRequest(al } 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 "spanner.projects.instances.databases.backupSchedules.getIamPolicy" call. +// Do executes the "spanner.projects.instances.databases.backupSchedules.create" 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 +// *BackupSchedule.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesBackupSchedulesCreateCall) Do(opts ...googleapi.CallOption) (*BackupSchedule, 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 := &BackupSchedule{ + 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 ProjectsInstancesDatabasesBackupSchedulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a backup schedule. +// +// - name: The name of the schedule to delete. Values are of the form +// `projects//instances//databases//backupSchedules/`. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) Delete(name string) *ProjectsInstancesDatabasesBackupSchedulesDeleteCall { + c := &ProjectsInstancesDatabasesBackupSchedulesDeleteCall{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 *ProjectsInstancesDatabasesBackupSchedulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesBackupSchedulesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesBackupSchedulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesBackupSchedulesDeleteCall) 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 "spanner.projects.instances.databases.backupSchedules.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 *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsInstancesDatabasesBackupSchedulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12542,7 +12845,485 @@ func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + 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 ProjectsInstancesDatabasesBackupSchedulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets backup schedule for the input schedule name. +// +// - name: The name of the schedule to retrieve. Values are of the form +// `projects//instances//databases//backupSchedules/`. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) Get(name string) *ProjectsInstancesDatabasesBackupSchedulesGetCall { + c := &ProjectsInstancesDatabasesBackupSchedulesGetCall{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 *ProjectsInstancesDatabasesBackupSchedulesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesGetCall { + 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 *ProjectsInstancesDatabasesBackupSchedulesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesBackupSchedulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesBackupSchedulesGetCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesBackupSchedulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesBackupSchedulesGetCall) 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 "spanner.projects.instances.databases.backupSchedules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupSchedule.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesBackupSchedulesGetCall) Do(opts ...googleapi.CallOption) (*BackupSchedule, 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 := &BackupSchedule{ + 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 ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a database or backup +// resource. Returns an empty policy if a database or backup exists but does +// not have a policy set. Authorization requires +// `spanner.databases.getIamPolicy` permission on resource. For backups, +// authorization requires `spanner.backups.getIamPolicy` permission on +// resource. +// +// - resource: REQUIRED: The Cloud Spanner resource for which the policy is +// being retrieved. The format is `projects//instances/` for instance +// resources and `projects//instances//databases/` for database resources. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { + c := &ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall{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 *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) 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 "spanner.projects.instances.databases.backupSchedules.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 *ProjectsInstancesDatabasesBackupSchedulesGetIamPolicyCall) 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 ProjectsInstancesDatabasesBackupSchedulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the backup schedules for the database. +// +// - parent: Database is the parent resource whose backup schedules should be +// listed. Values are of the form projects//instances//databases/. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) List(parent string) *ProjectsInstancesDatabasesBackupSchedulesListCall { + c := &ProjectsInstancesDatabasesBackupSchedulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Number of backup schedules +// to be returned in the response. If 0 or less, defaults to the server's +// maximum allowed page size. +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) PageSize(pageSize int64) *ProjectsInstancesDatabasesBackupSchedulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": If non-empty, +// `page_token` should contain a next_page_token from a previous +// ListBackupSchedulesResponse to the same `parent`. +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) PageToken(pageToken string) *ProjectsInstancesDatabasesBackupSchedulesListCall { + 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 *ProjectsInstancesDatabasesBackupSchedulesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesListCall { + 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 *ProjectsInstancesDatabasesBackupSchedulesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesDatabasesBackupSchedulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) 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}/backupSchedules") + 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 "spanner.projects.instances.databases.backupSchedules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupSchedulesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesBackupSchedulesListCall) Do(opts ...googleapi.CallOption) (*ListBackupSchedulesResponse, 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 := &ListBackupSchedulesResponse{ + 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 *ProjectsInstancesDatabasesBackupSchedulesListCall) Pages(ctx context.Context, f func(*ListBackupSchedulesResponse) 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 ProjectsInstancesDatabasesBackupSchedulesPatchCall struct { + s *Service + nameid string + backupschedule *BackupSchedule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a backup schedule. +// +// - 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 +// 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. +func (r *ProjectsInstancesDatabasesBackupSchedulesService) Patch(nameid string, backupschedule *BackupSchedule) *ProjectsInstancesDatabasesBackupSchedulesPatchCall { + c := &ProjectsInstancesDatabasesBackupSchedulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.nameid = nameid + c.backupschedule = backupschedule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A mask +// specifying which fields in the BackupSchedule resource should be updated. +// This mask is relative to the BackupSchedule resource, not to the request +// message. The field mask must always be specified; this prevents any future +// fields from being erased accidentally. +func (c *ProjectsInstancesDatabasesBackupSchedulesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesDatabasesBackupSchedulesPatchCall { + 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 *ProjectsInstancesDatabasesBackupSchedulesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesBackupSchedulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesBackupSchedulesPatchCall) Context(ctx context.Context) *ProjectsInstancesDatabasesBackupSchedulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesBackupSchedulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesBackupSchedulesPatchCall) 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.backupschedule) + 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.nameid, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "spanner.projects.instances.databases.backupSchedules.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupSchedule.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesBackupSchedulesPatchCall) Do(opts ...googleapi.CallOption) (*BackupSchedule, 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 := &BackupSchedule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index 935f713a882..62e604e2ce1 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -644,7 +644,7 @@ ] }, "addServerCa": { - "description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.", + "description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use AddServerCertificate to add a new server certificate.", "flatPath": "v1/projects/{project}/instances/{instance}/addServerCa", "httpMethod": "POST", "id": "sql.instances.addServerCa", @@ -1287,7 +1287,7 @@ ] }, "rotateServerCa": { - "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.", + "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use RotateServerCertificate to rotate the server certificate.", "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa", "httpMethod": "POST", "id": "sql.instances.rotateServerCa", @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240622", + "revision": "20240711", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2915,6 +2915,20 @@ "serverCaCert": { "$ref": "SslCert", "description": "SSL configuration." + }, + "serverCaMode": { + "description": "Specify what type of CA is used for the server certificate.", + "enum": [ + "CA_MODE_UNSPECIFIED", + "GOOGLE_MANAGED_INTERNAL_CA", + "GOOGLE_MANAGED_CAS_CA" + ], + "enumDescriptions": [ + "CA mode is unknown.", + "Google-managed self-signed internal CA.", + "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS)." + ], + "type": "string" } }, "type": "object" @@ -3415,6 +3429,10 @@ }, "type": "array" }, + "switchTransactionLogsToCloudStorageEnabled": { + "description": "Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.", + "type": "boolean" + }, "upgradableDatabaseVersions": { "description": "Output only. All database versions that are available for upgrade.", "items": { @@ -4490,6 +4508,20 @@ "description": "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the `require_ssl` flag.", "type": "boolean" }, + "serverCaMode": { + "description": "Specify what type of CA is used for the server certificate.", + "enum": [ + "CA_MODE_UNSPECIFIED", + "GOOGLE_MANAGED_INTERNAL_CA", + "GOOGLE_MANAGED_CAS_CA" + ], + "enumDescriptions": [ + "CA mode is unknown.", + "Google-managed self-signed internal CA.", + "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS)." + ], + "type": "string" + }, "sslMode": { "description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.", "enum": [ @@ -4807,7 +4839,8 @@ "RECONFIGURE_OLD_PRIMARY", "CLUSTER_MAINTENANCE", "SELF_SERVICE_MAINTENANCE", - "SWITCHOVER_TO_REPLICA" + "SWITCHOVER_TO_REPLICA", + "MAJOR_VERSION_UPGRADE" ], "enumDeprecated": [ false, @@ -4854,6 +4887,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -4901,7 +4935,8 @@ "Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.", "Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.", "Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", - "Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance." + "Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.", + "Updates the major version of a Cloud SQL instance." ], "type": "string" }, @@ -5579,7 +5614,8 @@ "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED", "EXTENSIONS_NOT_MIGRATED", "PG_CRON_FLAG_ENABLED_IN_REPLICA", - "EXTENSIONS_NOT_ENABLED_IN_REPLICA" + "EXTENSIONS_NOT_ENABLED_IN_REPLICA", + "UNSUPPORTED_COLUMNS" ], "enumDescriptions": [ "", @@ -5630,7 +5666,8 @@ "The warning message indicates the unsupported extensions will not be migrated to the destination.", "The warning message indicates the pg_cron extension and settings will not be migrated to the destination.", "The error message indicates that pg_cron flags are enabled on the destination which is not supported during the migration.", - "This error message indicates that the specified extensions are not enabled on destination instance. For example, before you can migrate data to the destination instance, you must enable the PGAudit extension on the instance." + "This error message indicates that the specified extensions are not enabled on destination instance. For example, before you can migrate data to the destination instance, you must enable the PGAudit extension on the instance.", + "The source database has generated columns that can't be migrated. Please change them to regular columns before migration." ], "type": "string" } diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 3cb4ae8ac1a..2129832d7d1 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -898,6 +898,14 @@ type ConnectSettings struct { Region string `json:"region,omitempty"` // ServerCaCert: SSL configuration. ServerCaCert *SslCert `json:"serverCaCert,omitempty"` + // ServerCaMode: Specify what type of CA is used for the server certificate. + // + // Possible values: + // "CA_MODE_UNSPECIFIED" - CA mode is unknown. + // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. + // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA + // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). + ServerCaMode string `json:"serverCaMode,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1259,6 +1267,10 @@ type DatabaseInstance struct { // "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or // denied access to SuspensionReason []string `json:"suspensionReason,omitempty"` + // SwitchTransactionLogsToCloudStorageEnabled: Input only. Whether Cloud SQL is + // enabled to switch storing point-in-time recovery log files from a data disk + // to Cloud Storage. + SwitchTransactionLogsToCloudStorageEnabled bool `json:"switchTransactionLogsToCloudStorageEnabled,omitempty"` // UpgradableDatabaseVersions: Output only. All database versions that are // available for upgrade. UpgradableDatabaseVersions []*AvailableDatabaseVersion `json:"upgradableDatabaseVersions,omitempty"` @@ -2688,6 +2700,14 @@ type IpConfiguration struct { // enforcing the requirement for valid client certificates, then use the // `ssl_mode` flag instead of the `require_ssl` flag. RequireSsl bool `json:"requireSsl,omitempty"` + // ServerCaMode: Specify what type of CA is used for the server certificate. + // + // Possible values: + // "CA_MODE_UNSPECIFIED" - CA mode is unknown. + // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. + // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA + // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). + ServerCaMode string `json:"serverCaMode,omitempty"` // SslMode: Specify how SSL/TLS is enforced in database connections. If you // must use the `require_ssl` flag for backward compatibility, then only the // following value pairs are valid: For PostgreSQL and MySQL: * @@ -3090,6 +3110,8 @@ type Operation struct { // "SWITCHOVER_TO_REPLICA" - Switches a primary instance to a replica. This // operation runs as part of a switchover operation to the original primary // instance. + // "MAJOR_VERSION_UPGRADE" - Updates the major version of a Cloud SQL + // instance. OperationType string `json:"operationType,omitempty"` // SelfLink: The URI of this resource. SelfLink string `json:"selfLink,omitempty"` @@ -3862,6 +3884,8 @@ type SqlExternalSyncSettingError struct { // the specified extensions are not enabled on destination instance. For // example, before you can migrate data to the destination instance, you must // enable the PGAudit extension on the instance. + // "UNSUPPORTED_COLUMNS" - The source database has generated columns that + // can't be migrated. Please change them to regular columns before migration. Type string `json:"type,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 @@ -6324,7 +6348,9 @@ type InstancesAddServerCaCall struct { // specified instance. Required to prepare for a certificate rotation. If a CA // version was previously added but never used in a certificate rotation, this // operation replaces that version. There cannot be more than one CA version -// waiting to be rotated in. +// waiting to be rotated in. For instances that have enabled Certificate +// Authority Service (CAS) based server CA, please use AddServerCertificate to +// add a new server certificate. // // - instance: Cloud SQL instance ID. This does not include the project ID. // - project: Project ID of the project that contains the instance. @@ -8392,7 +8418,9 @@ type InstancesRotateServerCaCall struct { // RotateServerCa: Rotates the server certificate to one signed by the // Certificate Authority (CA) version previously added with the addServerCA -// method. +// method. For instances that have enabled Certificate Authority Service (CAS) +// based server CA, please use RotateServerCertificate to rotate the server +// certificate. // // - instance: Cloud SQL instance ID. This does not include the project ID. // - project: Project ID of the project that contains the instance. diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 2e619e43fac..800300912a1 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -644,7 +644,7 @@ ] }, "addServerCa": { - "description": "Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.", + "description": "Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use AddServerCertificate to add a new server certificate.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa", "httpMethod": "POST", "id": "sql.instances.addServerCa", @@ -1287,7 +1287,7 @@ ] }, "rotateServerCa": { - "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.", + "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use RotateServerCertificate to rotate the server certificate.", "flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa", "httpMethod": "POST", "id": "sql.instances.rotateServerCa", @@ -2267,7 +2267,7 @@ } } }, - "revision": "20240622", + "revision": "20240711", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -2915,6 +2915,20 @@ "serverCaCert": { "$ref": "SslCert", "description": "SSL configuration." + }, + "serverCaMode": { + "description": "Specify what type of CA is used for the server certificate.", + "enum": [ + "CA_MODE_UNSPECIFIED", + "GOOGLE_MANAGED_INTERNAL_CA", + "GOOGLE_MANAGED_CAS_CA" + ], + "enumDescriptions": [ + "CA mode is unknown.", + "Google-managed self-signed internal CA.", + "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS)." + ], + "type": "string" } }, "type": "object" @@ -3416,6 +3430,10 @@ }, "type": "array" }, + "switchTransactionLogsToCloudStorageEnabled": { + "description": "Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.", + "type": "boolean" + }, "upgradableDatabaseVersions": { "description": "Output only. All database versions that are available for upgrade.", "items": { @@ -4491,6 +4509,20 @@ "description": "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the legacy `require_ssl` flag.", "type": "boolean" }, + "serverCaMode": { + "description": "Specify what type of CA is used for the server certificate.", + "enum": [ + "CA_MODE_UNSPECIFIED", + "GOOGLE_MANAGED_INTERNAL_CA", + "GOOGLE_MANAGED_CAS_CA" + ], + "enumDescriptions": [ + "CA mode is unknown.", + "Google-managed self-signed internal CA.", + "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS)." + ], + "type": "string" + }, "sslMode": { "description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.", "enum": [ @@ -4808,7 +4840,8 @@ "RECONFIGURE_OLD_PRIMARY", "CLUSTER_MAINTENANCE", "SELF_SERVICE_MAINTENANCE", - "SWITCHOVER_TO_REPLICA" + "SWITCHOVER_TO_REPLICA", + "MAJOR_VERSION_UPGRADE" ], "enumDeprecated": [ false, @@ -4855,6 +4888,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -4902,7 +4936,8 @@ "Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.", "Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.", "Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", - "Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance." + "Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.", + "Updates the major version of a Cloud SQL instance." ], "type": "string" }, @@ -5580,7 +5615,8 @@ "UNSUPPORTED_EXTENSIONS_NOT_MIGRATED", "EXTENSIONS_NOT_MIGRATED", "PG_CRON_FLAG_ENABLED_IN_REPLICA", - "EXTENSIONS_NOT_ENABLED_IN_REPLICA" + "EXTENSIONS_NOT_ENABLED_IN_REPLICA", + "UNSUPPORTED_COLUMNS" ], "enumDescriptions": [ "", @@ -5631,7 +5667,8 @@ "The warning message indicates the unsupported extensions will not be migrated to the destination.", "The warning message indicates the pg_cron extension and settings will not be migrated to the destination.", "The error message indicates that pg_cron flags are enabled on the destination which is not supported during the migration.", - "This error message indicates that the specified extensions are not enabled on destination instance. For example, before you can migrate data to the destination instance, you must enable the PGAudit extension on the instance." + "This error message indicates that the specified extensions are not enabled on destination instance. For example, before you can migrate data to the destination instance, you must enable the PGAudit extension on the instance.", + "The source database has generated columns that can't be migrated. Please change them to regular columns before migration." ], "type": "string" } diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index b5c51686f47..4d5e35dd3b1 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -897,6 +897,14 @@ type ConnectSettings struct { Region string `json:"region,omitempty"` // ServerCaCert: SSL configuration. ServerCaCert *SslCert `json:"serverCaCert,omitempty"` + // ServerCaMode: Specify what type of CA is used for the server certificate. + // + // Possible values: + // "CA_MODE_UNSPECIFIED" - CA mode is unknown. + // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. + // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA + // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). + ServerCaMode string `json:"serverCaMode,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1260,6 +1268,10 @@ type DatabaseInstance struct { // "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or // denied access to SuspensionReason []string `json:"suspensionReason,omitempty"` + // SwitchTransactionLogsToCloudStorageEnabled: Input only. Whether Cloud SQL is + // enabled to switch storing point-in-time recovery log files from a data disk + // to Cloud Storage. + SwitchTransactionLogsToCloudStorageEnabled bool `json:"switchTransactionLogsToCloudStorageEnabled,omitempty"` // UpgradableDatabaseVersions: Output only. All database versions that are // available for upgrade. UpgradableDatabaseVersions []*AvailableDatabaseVersion `json:"upgradableDatabaseVersions,omitempty"` @@ -2693,6 +2705,14 @@ type IpConfiguration struct { // enforcing the requirement for valid client certificates, then use the // `ssl_mode` flag instead of the legacy `require_ssl` flag. RequireSsl bool `json:"requireSsl,omitempty"` + // ServerCaMode: Specify what type of CA is used for the server certificate. + // + // Possible values: + // "CA_MODE_UNSPECIFIED" - CA mode is unknown. + // "GOOGLE_MANAGED_INTERNAL_CA" - Google-managed self-signed internal CA. + // "GOOGLE_MANAGED_CAS_CA" - Google-managed regional CA part of root CA + // hierarchy hosted on Google Cloud's Certificate Authority Service (CAS). + ServerCaMode string `json:"serverCaMode,omitempty"` // SslMode: Specify how SSL/TLS is enforced in database connections. If you // must use the `require_ssl` flag for backward compatibility, then only the // following value pairs are valid: For PostgreSQL and MySQL: * @@ -3095,6 +3115,8 @@ type Operation struct { // "SWITCHOVER_TO_REPLICA" - Switches a primary instance to a replica. This // operation runs as part of a switchover operation to the original primary // instance. + // "MAJOR_VERSION_UPGRADE" - Updates the major version of a Cloud SQL + // instance. OperationType string `json:"operationType,omitempty"` // SelfLink: The URI of this resource. SelfLink string `json:"selfLink,omitempty"` @@ -3867,6 +3889,8 @@ type SqlExternalSyncSettingError struct { // the specified extensions are not enabled on destination instance. For // example, before you can migrate data to the destination instance, you must // enable the PGAudit extension on the instance. + // "UNSUPPORTED_COLUMNS" - The source database has generated columns that + // can't be migrated. Please change them to regular columns before migration. Type string `json:"type,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 @@ -6325,7 +6349,9 @@ type InstancesAddServerCaCall struct { // specified instance. Required to prepare for a certificate rotation. If a CA // version was previously added but never used in a certificate rotation, this // operation replaces that version. There cannot be more than one CA version -// waiting to be rotated in. +// waiting to be rotated in. For instances that have enabled Certificate +// Authority Service (CAS) based server CA, please use AddServerCertificate to +// add a new server certificate. // // - instance: Cloud SQL instance ID. This does not include the project ID. // - project: Project ID of the project that contains the instance. @@ -8394,7 +8420,9 @@ type InstancesRotateServerCaCall struct { // RotateServerCa: Rotates the server certificate to one signed by the // Certificate Authority (CA) version previously added with the addServerCA -// method. +// method. For instances that have enabled Certificate Authority Service (CAS) +// based server CA, please use RotateServerCertificate to rotate the server +// certificate. // // - instance: Cloud SQL instance ID. This does not include the project ID. // - project: Project ID of the project that contains the instance. diff --git a/translate/v3/translate-api.json b/translate/v3/translate-api.json index b5e989f5b91..6d8b356dc24 100644 --- a/translate/v3/translate-api.json +++ b/translate/v3/translate-api.json @@ -1260,7 +1260,8 @@ "$ref": "Operation" }, "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-translation" ] } }, @@ -1395,7 +1396,7 @@ ], "parameters": { "name": { - "description": "Required. 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, @@ -1706,7 +1707,7 @@ } } }, - "revision": "20240126", + "revision": "20240718", "rootUrl": "https://translation.googleapis.com/", "schemas": { "AdaptiveMtDataset": { @@ -1817,7 +1818,7 @@ "id": "AdaptiveMtTranslateRequest", "properties": { "content": { - "description": "Required. The content of the input in string format. For now only one sentence per request is supported.", + "description": "Required. The content of the input in string format.", "items": { "type": "string" }, @@ -1826,6 +1827,14 @@ "dataset": { "description": "Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`", "type": "string" + }, + "glossaryConfig": { + "$ref": "TranslateTextGlossaryConfig", + "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": { + "$ref": "ReferenceSentenceConfig", + "description": "Configuration for caller provided reference sentences." } }, "type": "object" @@ -1834,6 +1843,13 @@ "description": "An AdaptiveMtTranslate response.", "id": "AdaptiveMtTranslateResponse", "properties": { + "glossaryTranslations": { + "description": "Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.", + "items": { + "$ref": "AdaptiveMtTranslation" + }, + "type": "array" + }, "languageCode": { "description": "Output only. The translation's language code.", "readOnly": true, @@ -2360,7 +2376,7 @@ "type": "string" }, "name": { - "description": "Required. 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": { @@ -2848,6 +2864,57 @@ }, "type": "object" }, + "ReferenceSentenceConfig": { + "description": "Message of caller-provided reference configuration.", + "id": "ReferenceSentenceConfig", + "properties": { + "referenceSentencePairLists": { + "description": "Reference sentences pair lists. Each list will be used as the references to translate the sentence under \"content\" field at the corresponding index. Length of the list is required to be equal to the length of \"content\" field.", + "items": { + "$ref": "ReferenceSentencePairList" + }, + "type": "array" + }, + "sourceLanguageCode": { + "description": "Source language code.", + "type": "string" + }, + "targetLanguageCode": { + "description": "Target language code.", + "type": "string" + } + }, + "type": "object" + }, + "ReferenceSentencePair": { + "description": "A pair of sentences used as reference in source and target languages.", + "id": "ReferenceSentencePair", + "properties": { + "sourceSentence": { + "description": "Source sentence in the sentence pair.", + "type": "string" + }, + "targetSentence": { + "description": "Target sentence in the sentence pair.", + "type": "string" + } + }, + "type": "object" + }, + "ReferenceSentencePairList": { + "description": "A list of reference sentence pairs.", + "id": "ReferenceSentencePairList", + "properties": { + "referenceSentencePairs": { + "description": "Reference sentence pairs.", + "items": { + "$ref": "ReferenceSentencePair" + }, + "type": "array" + } + }, + "type": "object" + }, "Romanization": { "description": "A single romanization response.", "id": "Romanization", @@ -3078,7 +3145,7 @@ "type": "string" }, "model": { - "description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used", + "description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - Translation LLM models: `projects/{project-number-or-id}/locations/{location-id}/models/general/translation-llm`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used", "type": "string" }, "sourceLanguageCode": { diff --git a/translate/v3/translate-gen.go b/translate/v3/translate-gen.go index b4abf97bd6b..c9ffa140a8b 100644 --- a/translate/v3/translate-gen.go +++ b/translate/v3/translate-gen.go @@ -417,12 +417,18 @@ func (s AdaptiveMtSentence) MarshalJSON() ([]byte, error) { // AdaptiveMtTranslateRequest: The request for sending an AdaptiveMt // translation query. type AdaptiveMtTranslateRequest struct { - // Content: Required. The content of the input in string format. For now only - // one sentence per request is supported. + // Content: Required. The content of the input in string format. Content []string `json:"content,omitempty"` // Dataset: Required. The resource name for the dataset to use for adaptive MT. // `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}` Dataset string `json:"dataset,omitempty"` + // 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"` + // ReferenceSentenceConfig: Configuration for caller provided reference + // sentences. + ReferenceSentenceConfig *ReferenceSentenceConfig `json:"referenceSentenceConfig,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 @@ -443,6 +449,10 @@ func (s AdaptiveMtTranslateRequest) MarshalJSON() ([]byte, error) { // AdaptiveMtTranslateResponse: An AdaptiveMtTranslate response. type AdaptiveMtTranslateResponse struct { + // GlossaryTranslations: Text translation response if a glossary is provided in + // the request. This could be the same as 'translation' above if no terms + // apply. + GlossaryTranslations []*AdaptiveMtTranslation `json:"glossaryTranslations,omitempty"` // LanguageCode: Output only. The translation's language code. LanguageCode string `json:"languageCode,omitempty"` // Translations: Output only. The translation. @@ -450,15 +460,15 @@ type AdaptiveMtTranslateResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "LanguageCode") to + // ForceSendFields is a list of field names (e.g. "GlossaryTranslations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://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 + // NullFields is a list of field names (e.g. "GlossaryTranslations") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1261,7 +1271,7 @@ func (s Glossary) MarshalJSON() ([]byte, error) { type GlossaryEntry struct { // Description: Describes the glossary entry. Description string `json:"description,omitempty"` - // Name: Required. The resource name of the entry. Format: + // Name: Identifier. The resource name of the entry. Format: // "projects/*/locations/*/glossaries/*/glossaryEntries/*" Name string `json:"name,omitempty"` // TermsPair: Used for an unidirectional glossary. @@ -2077,6 +2087,82 @@ func (s OutputConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ReferenceSentenceConfig: Message of caller-provided reference configuration. +type ReferenceSentenceConfig struct { + // ReferenceSentencePairLists: Reference sentences pair lists. Each list will + // be used as the references to translate the sentence under "content" field at + // the corresponding index. Length of the list is required to be equal to the + // length of "content" field. + ReferenceSentencePairLists []*ReferenceSentencePairList `json:"referenceSentencePairLists,omitempty"` + // SourceLanguageCode: Source language code. + SourceLanguageCode string `json:"sourceLanguageCode,omitempty"` + // TargetLanguageCode: Target language code. + TargetLanguageCode string `json:"targetLanguageCode,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReferenceSentencePairLists") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReferenceSentencePairLists") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReferenceSentenceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ReferenceSentenceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReferenceSentencePair: A pair of sentences used as reference in source and +// target languages. +type ReferenceSentencePair struct { + // SourceSentence: Source sentence in the sentence pair. + SourceSentence string `json:"sourceSentence,omitempty"` + // TargetSentence: Target sentence in the sentence pair. + TargetSentence string `json:"targetSentence,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceSentence") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceSentence") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReferenceSentencePair) MarshalJSON() ([]byte, error) { + type NoMethod ReferenceSentencePair + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ReferenceSentencePairList: A list of reference sentence pairs. +type ReferenceSentencePairList struct { + // ReferenceSentencePairs: Reference sentence pairs. + ReferenceSentencePairs []*ReferenceSentencePair `json:"referenceSentencePairs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ReferenceSentencePairs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ReferenceSentencePairs") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReferenceSentencePairList) MarshalJSON() ([]byte, error) { + type NoMethod ReferenceSentencePairList + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Romanization: A single romanization response. type Romanization struct { // DetectedLanguageCode: The ISO-639 language code of source text in the @@ -2421,8 +2507,10 @@ type TranslateTextRequest struct { // `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // For global (non-regionalized) requests, use `location-id` `global`. For - // example, + // - Translation LLM models: + // `projects/{project-number-or-id}/locations/{location-id}/models/general/trans + // lation-llm`, For global (non-regionalized) requests, use `location-id` + // `global`. For example, // `projects/{project-number-or-id}/locations/global/models/general/nmt`. If // not provided, the default Google model (NMT) will be used Model string `json:"model,omitempty"` @@ -7260,7 +7348,7 @@ type ProjectsLocationsGlossariesGlossaryEntriesPatchCall struct { // Patch: Updates a glossary entry. // -// - name: The resource name of the entry. Format: +// - name: Identifier. The resource name of the entry. Format: // "projects/*/locations/*/glossaries/*/glossaryEntries/*". func (r *ProjectsLocationsGlossariesGlossaryEntriesService) Patch(name string, glossaryentry *GlossaryEntry) *ProjectsLocationsGlossariesGlossaryEntriesPatchCall { c := &ProjectsLocationsGlossariesGlossaryEntriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} diff --git a/vmmigration/v1/vmmigration-api.json b/vmmigration/v1/vmmigration-api.json index 8efe719aec1..8dc686259f9 100644 --- a/vmmigration/v1/vmmigration-api.json +++ b/vmmigration/v1/vmmigration-api.json @@ -2280,7 +2280,7 @@ } } }, - "revision": "20240704", + "revision": "20240712", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4056,6 +4056,10 @@ "$ref": "Encryption", "description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." }, + "machineImageTargetDefaults": { + "$ref": "MachineImageTargetDetails", + "description": "Immutable. Target details for importing a machine image, will be used by ImageImportJob." + }, "name": { "description": "Output only. The resource path of the ImageImport.", "readOnly": true, @@ -4114,6 +4118,11 @@ "readOnly": true, "type": "array" }, + "machineImageTargetDetails": { + "$ref": "MachineImageTargetDetails", + "description": "Output only. Target details used to import a machine image.", + "readOnly": true + }, "name": { "description": "Output only. The resource path of the ImageImportJob.", "readOnly": true, @@ -4653,6 +4662,92 @@ }, "type": "object" }, + "MachineImageParametersOverrides": { + "description": "Parameters overriding decisions based on the source machine image configurations.", + "id": "MachineImageParametersOverrides", + "properties": { + "machineType": { + "description": "Optional. The machine type to create the MachineImage with. If empty, the service will choose a relevant machine type based on the information from the source image. For more information about machine types, please refer to https://cloud.google.com/compute/docs/machine-resource.", + "type": "string" + } + }, + "type": "object" + }, + "MachineImageTargetDetails": { + "description": "The target details of the machine image resource that will be created by the image import job.", + "id": "MachineImageTargetDetails", + "properties": { + "additionalLicenses": { + "description": "Optional. Additional licenses to assign to the instance created by the machine image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Optional. An optional description of the machine image.", + "type": "string" + }, + "encryption": { + "$ref": "Encryption", + "description": "Immutable. The encryption to apply to the machine image." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to apply to the instance created by the machine image.", + "type": "object" + }, + "machineImageName": { + "description": "Required. The name of the machine image to be created.", + "type": "string" + }, + "machineImageParametersOverrides": { + "$ref": "MachineImageParametersOverrides", + "description": "Optional. Parameters overriding decisions based on the source machine image configurations." + }, + "networkInterfaces": { + "description": "Optional. The network interfaces to create with the instance created by the machine image. Internal and external IP addresses are ignored for machine image import.", + "items": { + "$ref": "NetworkInterface" + }, + "type": "array" + }, + "osAdaptationParameters": { + "$ref": "ImageImportOsAdaptationParameters", + "description": "Optional. Use to set the parameters relevant for the OS adaptation process." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "Optional. The service account to assign to the instance created by the machine image." + }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig", + "description": "Optional. Shielded instance configuration." + }, + "singleRegionStorage": { + "description": "Optional. Set to true to set the machine image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", + "type": "boolean" + }, + "skipOsAdaptation": { + "$ref": "SkipOsAdaptation", + "description": "Optional. Use to skip OS adaptation process." + }, + "tags": { + "description": "Optional. The tags to apply to the instance created by the machine image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "targetProject": { + "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported machine image will be created.", + "type": "string" + } + }, + "type": "object" + }, "MigratingVm": { "description": "MigratingVm describes the VM that will be migrated from a Source environment and its replication state.", "id": "MigratingVm", @@ -4945,6 +5040,20 @@ "description": "The network to connect the NIC to.", "type": "string" }, + "networkTier": { + "description": "Optional. The networking tier used for configuring network access configuration. If left empty, will default to PREMIUM.", + "enum": [ + "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED", + "NETWORK_TIER_STANDARD", + "NETWORK_TIER_PREMIUM" + ], + "enumDescriptions": [ + "An unspecified network tier. Will be used as PREMIUM.", + "A standard network tier.", + "A premium network tier." + ], + "type": "string" + }, "subnetwork": { "description": "Optional. The subnetwork to connect the NIC to.", "type": "string" @@ -5342,12 +5451,65 @@ }, "type": "object" }, + "ServiceAccount": { + "description": "Service account to assign to the instance created by the machine image.", + "id": "ServiceAccount", + "properties": { + "email": { + "description": "Required. The email address of the service account.", + "type": "string" + }, + "scopes": { + "description": "Optional. The list of scopes to be made available for this service account.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ShieldedInstanceConfig": { + "description": "Shielded instance configuration.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance created by the machine image has integrity monitoring enabled. This can be set to true only if the image boot option is EFI, and vTPM is enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance created by the machine image has vTPM enabled. This can be set to true only if the image boot option is EFI.", + "type": "boolean" + }, + "secureBoot": { + "description": "Optional. Defines whether the instance created by the machine image has Secure Boot enabled. This can be set to true only if the image boot option is EFI.", + "enum": [ + "SECURE_BOOT_UNSPECIFIED", + "TRUE", + "FALSE" + ], + "enumDescriptions": [ + "No explicit value is selected. Will use the configuration of the source (if exists, otherwise the default will be false).", + "Use secure boot. This can be set to true only if the image boot option is EFI.", + "Do not use secure boot." + ], + "type": "string" + } + }, + "type": "object" + }, "ShuttingDownSourceVMStep": { "description": "ShuttingDownSourceVMStep contains specific step details.", "id": "ShuttingDownSourceVMStep", "properties": {}, "type": "object" }, + "SkipOsAdaptation": { + "description": "Mentions that the machine image import is not using OS adaptation process.", + "id": "SkipOsAdaptation", + "properties": {}, + "type": "object" + }, "Source": { "description": "Source message describes a specific vm migration Source resource. It contains the source environment information.", "id": "Source", diff --git a/vmmigration/v1/vmmigration-gen.go b/vmmigration/v1/vmmigration-gen.go index c58d43289fc..7f7098c4578 100644 --- a/vmmigration/v1/vmmigration-gen.go +++ b/vmmigration/v1/vmmigration-gen.go @@ -1947,6 +1947,9 @@ type ImageImport struct { // Encryption: Immutable. The encryption details used by the image import // process during the image adaptation for Compute Engine. Encryption *Encryption `json:"encryption,omitempty"` + // MachineImageTargetDefaults: Immutable. Target details for importing a + // machine image, will be used by ImageImportJob. + MachineImageTargetDefaults *MachineImageTargetDetails `json:"machineImageTargetDefaults,omitempty"` // Name: Output only. The resource path of the ImageImport. Name string `json:"name,omitempty"` // RecentImageImportJobs: Output only. The result of the most recent runs for @@ -1994,6 +1997,9 @@ type ImageImportJob struct { // Errors: Output only. Provides details on the error that led to the image // import state in case of an error. Errors []*Status `json:"errors,omitempty"` + // MachineImageTargetDetails: Output only. Target details used to import a + // machine image. + MachineImageTargetDetails *MachineImageTargetDetails `json:"machineImageTargetDetails,omitempty"` // Name: Output only. The resource path of the ImageImportJob. Name string `json:"name,omitempty"` // State: Output only. The state of the image import. @@ -2613,6 +2619,96 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MachineImageParametersOverrides: Parameters overriding decisions based on +// the source machine image configurations. +type MachineImageParametersOverrides struct { + // MachineType: Optional. The machine type to create the MachineImage with. If + // empty, the service will choose a relevant machine type based on the + // information from the source image. For more information about machine types, + // please refer to https://cloud.google.com/compute/docs/machine-resource. + MachineType string `json:"machineType,omitempty"` + // ForceSendFields is a list of field names (e.g. "MachineType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MachineType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MachineImageParametersOverrides) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageParametersOverrides + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MachineImageTargetDetails: The target details of the machine image resource +// that will be created by the image import job. +type MachineImageTargetDetails struct { + // AdditionalLicenses: Optional. Additional licenses to assign to the instance + // created by the machine image. Format: + // https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + // Or + // https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + AdditionalLicenses []string `json:"additionalLicenses,omitempty"` + // Description: Optional. An optional description of the machine image. + Description string `json:"description,omitempty"` + // Encryption: Immutable. The encryption to apply to the machine image. + Encryption *Encryption `json:"encryption,omitempty"` + // Labels: Optional. The labels to apply to the instance created by the machine + // image. + Labels map[string]string `json:"labels,omitempty"` + // MachineImageName: Required. The name of the machine image to be created. + MachineImageName string `json:"machineImageName,omitempty"` + // MachineImageParametersOverrides: Optional. Parameters overriding decisions + // based on the source machine image configurations. + MachineImageParametersOverrides *MachineImageParametersOverrides `json:"machineImageParametersOverrides,omitempty"` + // NetworkInterfaces: Optional. The network interfaces to create with the + // instance created by the machine image. Internal and external IP addresses + // are ignored for machine image import. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // OsAdaptationParameters: Optional. Use to set the parameters relevant for the + // OS adaptation process. + OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"` + // ServiceAccount: Optional. The service account to assign to the instance + // created by the machine image. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + // ShieldedInstanceConfig: Optional. Shielded instance configuration. + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // SingleRegionStorage: Optional. Set to true to set the machine image + // storageLocations to the single region of the import job. When false, the + // closest multi-region is selected. + SingleRegionStorage bool `json:"singleRegionStorage,omitempty"` + // SkipOsAdaptation: Optional. Use to skip OS adaptation process. + SkipOsAdaptation *SkipOsAdaptation `json:"skipOsAdaptation,omitempty"` + // Tags: Optional. The tags to apply to the instance created by the machine + // image. + Tags []string `json:"tags,omitempty"` + // TargetProject: Required. Reference to the TargetProject resource that + // represents the target project in which the imported machine image will be + // created. + TargetProject string `json:"targetProject,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalLicenses") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MachineImageTargetDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageTargetDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MigratingVm: MigratingVm describes the VM that will be migrated from a // Source environment and its replication state. type MigratingVm struct { @@ -2855,6 +2951,15 @@ 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. + // + // Possible values: + // "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED" - An unspecified network tier. + // Will be used as PREMIUM. + // "NETWORK_TIER_STANDARD" - A standard network tier. + // "NETWORK_TIER_PREMIUM" - A premium network tier. + NetworkTier string `json:"networkTier,omitempty"` // Subnetwork: Optional. The subnetwork to connect the NIC to. Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "ExternalIp") to @@ -3299,11 +3404,82 @@ func (s SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ServiceAccount: Service account to assign to the instance created by the +// machine image. +type ServiceAccount struct { + // Email: Required. The email address of the service account. + Email string `json:"email,omitempty"` + // Scopes: Optional. The list of scopes to be made available for this service + // account. + Scopes []string `json:"scopes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Email") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceConfig: Shielded instance configuration. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Optional. Defines whether the instance created by + // the machine image has integrity monitoring enabled. This can be set to true + // only if the image boot option is EFI, and vTPM is enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance created by the machine + // image has vTPM enabled. This can be set to true only if the image boot + // option is EFI. + EnableVtpm bool `json:"enableVtpm,omitempty"` + // SecureBoot: Optional. Defines whether the instance created by the machine + // image has Secure Boot enabled. This can be set to true only if the image + // boot option is EFI. + // + // Possible values: + // "SECURE_BOOT_UNSPECIFIED" - No explicit value is selected. Will use the + // configuration of the source (if exists, otherwise the default will be + // false). + // "TRUE" - Use secure boot. This can be set to true only if the image boot + // option is EFI. + // "FALSE" - Do not use secure boot. + SecureBoot string `json:"secureBoot,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ShuttingDownSourceVMStep: ShuttingDownSourceVMStep contains specific step // details. type ShuttingDownSourceVMStep struct { } +// SkipOsAdaptation: Mentions that the machine image import is not using OS +// adaptation process. +type SkipOsAdaptation struct { +} + // Source: Source message describes a specific vm migration Source resource. It // contains the source environment information. type Source struct { diff --git a/vmmigration/v1alpha1/vmmigration-api.json b/vmmigration/v1alpha1/vmmigration-api.json index aabc85c5c06..338595c2122 100644 --- a/vmmigration/v1alpha1/vmmigration-api.json +++ b/vmmigration/v1alpha1/vmmigration-api.json @@ -2280,7 +2280,7 @@ } } }, - "revision": "20240704", + "revision": "20240712", "rootUrl": "https://vmmigration.googleapis.com/", "schemas": { "AccessKeyCredentials": { @@ -4091,6 +4091,10 @@ "$ref": "Encryption", "description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." }, + "machineImageTargetDefaults": { + "$ref": "MachineImageTargetDetails", + "description": "Immutable. Target details for importing a machine image, will be used by ImageImportJob." + }, "name": { "description": "Output only. The resource path of the ImageImport.", "readOnly": true, @@ -4149,6 +4153,11 @@ "readOnly": true, "type": "array" }, + "machineImageTargetDetails": { + "$ref": "MachineImageTargetDetails", + "description": "Output only. Target details used to import a machine image.", + "readOnly": true + }, "name": { "description": "Output only. The resource path of the ImageImportJob.", "readOnly": true, @@ -4688,6 +4697,92 @@ }, "type": "object" }, + "MachineImageParametersOverrides": { + "description": "Parameters overriding decisions based on the source machine image configurations.", + "id": "MachineImageParametersOverrides", + "properties": { + "machineType": { + "description": "Optional. The machine type to create the MachineImage with. If empty, the service will choose a relevant machine type based on the information from the source image. For more information about machine types, please refer to https://cloud.google.com/compute/docs/machine-resource.", + "type": "string" + } + }, + "type": "object" + }, + "MachineImageTargetDetails": { + "description": "The target details of the machine image resource that will be created by the image import job.", + "id": "MachineImageTargetDetails", + "properties": { + "additionalLicenses": { + "description": "Optional. Additional licenses to assign to the instance created by the machine image. Format: https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME Or https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME", + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "description": "Optional. An optional description of the machine image.", + "type": "string" + }, + "encryption": { + "$ref": "Encryption", + "description": "Immutable. The encryption to apply to the machine image." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to apply to the instance created by the machine image.", + "type": "object" + }, + "machineImageName": { + "description": "Required. The name of the machine image to be created.", + "type": "string" + }, + "machineImageParametersOverrides": { + "$ref": "MachineImageParametersOverrides", + "description": "Optional. Parameters overriding decisions based on the source machine image configurations." + }, + "networkInterfaces": { + "description": "Optional. The network interfaces to create with the instance created by the machine image. Internal and external IP addresses are ignored for machine image import.", + "items": { + "$ref": "NetworkInterface" + }, + "type": "array" + }, + "osAdaptationParameters": { + "$ref": "ImageImportOsAdaptationParameters", + "description": "Optional. Use to set the parameters relevant for the OS adaptation process." + }, + "serviceAccount": { + "$ref": "ServiceAccount", + "description": "Optional. The service account to assign to the instance created by the machine image." + }, + "shieldedInstanceConfig": { + "$ref": "ShieldedInstanceConfig", + "description": "Optional. Shielded instance configuration." + }, + "singleRegionStorage": { + "description": "Optional. Set to true to set the machine image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", + "type": "boolean" + }, + "skipOsAdaptation": { + "$ref": "SkipOsAdaptation", + "description": "Optional. Use to skip OS adaptation process." + }, + "tags": { + "description": "Optional. The tags to apply to the instance created by the machine image.", + "items": { + "type": "string" + }, + "type": "array" + }, + "targetProject": { + "description": "Required. Reference to the TargetProject resource that represents the target project in which the imported machine image will be created.", + "type": "string" + } + }, + "type": "object" + }, "MigratingVm": { "description": "MigratingVm describes the VM that will be migrated from a Source environment and its replication state.", "id": "MigratingVm", @@ -4990,6 +5085,20 @@ "description": "The network to connect the NIC to.", "type": "string" }, + "networkTier": { + "description": "Optional. The networking tier used for configuring network access configuration. If left empty, will default to PREMIUM.", + "enum": [ + "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED", + "NETWORK_TIER_STANDARD", + "NETWORK_TIER_PREMIUM" + ], + "enumDescriptions": [ + "An unspecified network tier. Will be used as PREMIUM.", + "A standard network tier.", + "A premium network tier." + ], + "type": "string" + }, "subnetwork": { "description": "Optional. The subnetwork to connect the NIC to.", "type": "string" @@ -5393,12 +5502,65 @@ }, "type": "object" }, + "ServiceAccount": { + "description": "Service account to assign to the instance created by the machine image.", + "id": "ServiceAccount", + "properties": { + "email": { + "description": "Required. The email address of the service account.", + "type": "string" + }, + "scopes": { + "description": "Optional. The list of scopes to be made available for this service account.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ShieldedInstanceConfig": { + "description": "Shielded instance configuration.", + "id": "ShieldedInstanceConfig", + "properties": { + "enableIntegrityMonitoring": { + "description": "Optional. Defines whether the instance created by the machine image has integrity monitoring enabled. This can be set to true only if the image boot option is EFI, and vTPM is enabled.", + "type": "boolean" + }, + "enableVtpm": { + "description": "Optional. Defines whether the instance created by the machine image has vTPM enabled. This can be set to true only if the image boot option is EFI.", + "type": "boolean" + }, + "secureBoot": { + "description": "Optional. Defines whether the instance created by the machine image has Secure Boot enabled. This can be set to true only if the image boot option is EFI.", + "enum": [ + "SECURE_BOOT_UNSPECIFIED", + "TRUE", + "FALSE" + ], + "enumDescriptions": [ + "No explicit value is selected. Will use the configuration of the source (if exists, otherwise the default will be false).", + "Use secure boot. This can be set to true only if the image boot option is EFI.", + "Do not use secure boot." + ], + "type": "string" + } + }, + "type": "object" + }, "ShuttingDownSourceVMStep": { "description": "ShuttingDownSourceVMStep contains specific step details.", "id": "ShuttingDownSourceVMStep", "properties": {}, "type": "object" }, + "SkipOsAdaptation": { + "description": "Mentions that the machine image import is not using OS adaptation process.", + "id": "SkipOsAdaptation", + "properties": {}, + "type": "object" + }, "Source": { "description": "Source message describes a specific vm migration Source resource. It contains the source environment information.", "id": "Source", diff --git a/vmmigration/v1alpha1/vmmigration-gen.go b/vmmigration/v1alpha1/vmmigration-gen.go index 888c2a83164..a4199c4dd0d 100644 --- a/vmmigration/v1alpha1/vmmigration-gen.go +++ b/vmmigration/v1alpha1/vmmigration-gen.go @@ -1963,6 +1963,9 @@ type ImageImport struct { // Encryption: Immutable. The encryption details used by the image import // process during the image adaptation for Compute Engine. Encryption *Encryption `json:"encryption,omitempty"` + // MachineImageTargetDefaults: Immutable. Target details for importing a + // machine image, will be used by ImageImportJob. + MachineImageTargetDefaults *MachineImageTargetDetails `json:"machineImageTargetDefaults,omitempty"` // Name: Output only. The resource path of the ImageImport. Name string `json:"name,omitempty"` // RecentImageImportJobs: Output only. The result of the most recent runs for @@ -2010,6 +2013,9 @@ type ImageImportJob struct { // Errors: Output only. Provides details on the error that led to the image // import state in case of an error. Errors []*Status `json:"errors,omitempty"` + // MachineImageTargetDetails: Output only. Target details used to import a + // machine image. + MachineImageTargetDetails *MachineImageTargetDetails `json:"machineImageTargetDetails,omitempty"` // Name: Output only. The resource path of the ImageImportJob. Name string `json:"name,omitempty"` // State: Output only. The state of the image import. @@ -2629,6 +2635,96 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MachineImageParametersOverrides: Parameters overriding decisions based on +// the source machine image configurations. +type MachineImageParametersOverrides struct { + // MachineType: Optional. The machine type to create the MachineImage with. If + // empty, the service will choose a relevant machine type based on the + // information from the source image. For more information about machine types, + // please refer to https://cloud.google.com/compute/docs/machine-resource. + MachineType string `json:"machineType,omitempty"` + // ForceSendFields is a list of field names (e.g. "MachineType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MachineType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MachineImageParametersOverrides) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageParametersOverrides + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MachineImageTargetDetails: The target details of the machine image resource +// that will be created by the image import job. +type MachineImageTargetDetails struct { + // AdditionalLicenses: Optional. Additional licenses to assign to the instance + // created by the machine image. Format: + // https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + // Or + // https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + AdditionalLicenses []string `json:"additionalLicenses,omitempty"` + // Description: Optional. An optional description of the machine image. + Description string `json:"description,omitempty"` + // Encryption: Immutable. The encryption to apply to the machine image. + Encryption *Encryption `json:"encryption,omitempty"` + // Labels: Optional. The labels to apply to the instance created by the machine + // image. + Labels map[string]string `json:"labels,omitempty"` + // MachineImageName: Required. The name of the machine image to be created. + MachineImageName string `json:"machineImageName,omitempty"` + // MachineImageParametersOverrides: Optional. Parameters overriding decisions + // based on the source machine image configurations. + MachineImageParametersOverrides *MachineImageParametersOverrides `json:"machineImageParametersOverrides,omitempty"` + // NetworkInterfaces: Optional. The network interfaces to create with the + // instance created by the machine image. Internal and external IP addresses + // are ignored for machine image import. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + // OsAdaptationParameters: Optional. Use to set the parameters relevant for the + // OS adaptation process. + OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"` + // ServiceAccount: Optional. The service account to assign to the instance + // created by the machine image. + ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"` + // ShieldedInstanceConfig: Optional. Shielded instance configuration. + ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` + // SingleRegionStorage: Optional. Set to true to set the machine image + // storageLocations to the single region of the import job. When false, the + // closest multi-region is selected. + SingleRegionStorage bool `json:"singleRegionStorage,omitempty"` + // SkipOsAdaptation: Optional. Use to skip OS adaptation process. + SkipOsAdaptation *SkipOsAdaptation `json:"skipOsAdaptation,omitempty"` + // Tags: Optional. The tags to apply to the instance created by the machine + // image. + Tags []string `json:"tags,omitempty"` + // TargetProject: Required. Reference to the TargetProject resource that + // represents the target project in which the imported machine image will be + // created. + TargetProject string `json:"targetProject,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdditionalLicenses") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MachineImageTargetDetails) MarshalJSON() ([]byte, error) { + type NoMethod MachineImageTargetDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MigratingVm: MigratingVm describes the VM that will be migrated from a // Source environment and its replication state. type MigratingVm struct { @@ -2878,6 +2974,15 @@ 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. + // + // Possible values: + // "COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED" - An unspecified network tier. + // Will be used as PREMIUM. + // "NETWORK_TIER_STANDARD" - A standard network tier. + // "NETWORK_TIER_PREMIUM" - A premium network tier. + NetworkTier string `json:"networkTier,omitempty"` // Subnetwork: Optional. The subnetwork to connect the NIC to. Subnetwork string `json:"subnetwork,omitempty"` // ForceSendFields is a list of field names (e.g. "ExternalIp") to @@ -3324,11 +3429,82 @@ func (s SchedulingNodeAffinity) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ServiceAccount: Service account to assign to the instance created by the +// machine image. +type ServiceAccount struct { + // Email: Required. The email address of the service account. + Email string `json:"email,omitempty"` + // Scopes: Optional. The list of scopes to be made available for this service + // account. + Scopes []string `json:"scopes,omitempty"` + // ForceSendFields is a list of field names (e.g. "Email") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Email") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ServiceAccount) MarshalJSON() ([]byte, error) { + type NoMethod ServiceAccount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ShieldedInstanceConfig: Shielded instance configuration. +type ShieldedInstanceConfig struct { + // EnableIntegrityMonitoring: Optional. Defines whether the instance created by + // the machine image has integrity monitoring enabled. This can be set to true + // only if the image boot option is EFI, and vTPM is enabled. + EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"` + // EnableVtpm: Optional. Defines whether the instance created by the machine + // image has vTPM enabled. This can be set to true only if the image boot + // option is EFI. + EnableVtpm bool `json:"enableVtpm,omitempty"` + // SecureBoot: Optional. Defines whether the instance created by the machine + // image has Secure Boot enabled. This can be set to true only if the image + // boot option is EFI. + // + // Possible values: + // "SECURE_BOOT_UNSPECIFIED" - No explicit value is selected. Will use the + // configuration of the source (if exists, otherwise the default will be + // false). + // "TRUE" - Use secure boot. This can be set to true only if the image boot + // option is EFI. + // "FALSE" - Do not use secure boot. + SecureBoot string `json:"secureBoot,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnableIntegrityMonitoring") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnableIntegrityMonitoring") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ShieldedInstanceConfig) MarshalJSON() ([]byte, error) { + type NoMethod ShieldedInstanceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ShuttingDownSourceVMStep: ShuttingDownSourceVMStep contains specific step // details. type ShuttingDownSourceVMStep struct { } +// SkipOsAdaptation: Mentions that the machine image import is not using OS +// adaptation process. +type SkipOsAdaptation struct { +} + // Source: Source message describes a specific vm migration Source resource. It // contains the source environment information. type Source struct { diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 45311994419..b4f416b649a 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20240627", + "revision": "20240723", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -4244,6 +4244,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "seatInfo": { "$ref": "EventSeat", "description": "Seating details for this ticket." @@ -4662,15 +4666,15 @@ "description": "Links module data. If links module data is also defined on the object, both will be displayed." }, "localBoardingDateTime": { - "description": "The boarding time as it would be printed on the boarding pass. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport. If this is not set, Google will set it based on data from other sources.", + "description": "The boarding time as it would be printed on the boarding pass. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport.", "type": "string" }, "localEstimatedOrActualArrivalDateTime": { - "description": "The estimated time the aircraft plans to reach the destination gate (not the runway) or the actual time it reached the gate. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already arrived at the gate. Google will use it to inform the user that the flight has arrived at the gate. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport. If this is not set, Google will set it based on data from other sources.", + "description": "The estimated time the aircraft plans to reach the destination gate (not the runway) or the actual time it reached the gate. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already arrived at the gate. Google will use it to inform the user that the flight has arrived at the gate. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport.", "type": "string" }, "localEstimatedOrActualDepartureDateTime": { - "description": "The estimated time the aircraft plans to pull from the gate or the actual time the aircraft already pulled from the gate. Note: This is not the runway time. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already pulled from the gate. Google will use it to inform the user when the flight actually departed. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport. If this is not set, Google will set it based on data from other sources.", + "description": "The estimated time the aircraft plans to pull from the gate or the actual time the aircraft already pulled from the gate. Note: This is not the runway time. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already pulled from the gate. Google will use it to inform the user when the flight actually departed. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport.", "type": "string" }, "localGateClosingDateTime": { @@ -4678,7 +4682,7 @@ "type": "string" }, "localScheduledArrivalDateTime": { - "description": "The scheduled time the aircraft plans to reach the destination gate (not the runway). Note: This field should not change too close to the flight time. For updates to departure times (delays, etc), please set `localEstimatedOrActualArrivalDateTime`. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport. If this is not set, Google will set it based on data from other sources.", + "description": "The scheduled time the aircraft plans to reach the destination gate (not the runway). Note: This field should not change too close to the flight time. For updates to departure times (delays, etc), please set `localEstimatedOrActualArrivalDateTime`. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport.", "type": "string" }, "localScheduledDepartureDateTime": { @@ -4985,6 +4989,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "securityProgramLogo": { "$ref": "Image", "description": "An image for the security program that applies to the passenger." @@ -5339,6 +5347,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode settings/details." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "smartTapRedemptionValue": { "description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", "type": "string" @@ -5813,6 +5825,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "smartTapRedemptionValue": { "description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", "type": "string" @@ -6637,6 +6653,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "secondaryLoyaltyPoints": { "$ref": "LoyaltyPoints", "description": "The secondary loyalty reward points label, balance, and type. Shown in addition to the primary loyalty points." @@ -7563,6 +7583,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "smartTapRedemptionValue": { "description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", "type": "string" @@ -8132,6 +8156,17 @@ }, "type": "object" }, + "SaveRestrictions": { + "description": "Defines restrictions on the object that will be verified during save. Note: this is an advanced feature, please contact Google for implementation support.", + "id": "SaveRestrictions", + "properties": { + "restrictToEmailSha256": { + "description": "Restrict the save of the referencing object to the given email address only. This is the hex output of SHA256 sum of the email address, all lowercase and without any notations like \".\" or \"+\", except \"@\". For example, for example@example.com, this value will be 31c5543c1734d25c7206f5fd591525d0295bec6fe84ff82f946a34fe970a1e66 and for Example@example.com, this value will be bc34f262c93ad7122763684ccea6f07fb7f5d8a2d11e60ce15a6f43fe70ce632 If email address of the logged-in user who tries to save this pass does not match with the defined value here, users won't be allowed to save this pass. They will instead be prompted with an error to contact the issuer. This information should be gathered from the user with an explicit consent via Sign in with Google integration https://developers.google.com/identity/authentication. Please contact with support before using Save Restrictions.", + "type": "string" + } + }, + "type": "object" + }, "SecurityAnimation": { "id": "SecurityAnimation", "properties": { @@ -8994,6 +9029,10 @@ "$ref": "RotatingBarcode", "description": "The rotating barcode type and value." }, + "saveRestrictions": { + "$ref": "SaveRestrictions", + "description": "Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass." + }, "smartTapRedemptionValue": { "description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", "type": "string" diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 946d74b8ace..c618f976ddf 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -2160,6 +2160,12 @@ type EventTicketObject struct { ReservationInfo *EventReservationInfo `json:"reservationInfo,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SeatInfo: Seating details for this ticket. SeatInfo *EventSeat `json:"seatInfo,omitempty"` // SmartTapRedemptionValue: The value that will be transmitted to a Smart Tap @@ -2568,8 +2574,7 @@ type FlightClass struct { // offset. Time may be specified up to millisecond precision. eg: // `2027-03-05T06:30:00` This should be the local date/time at the airport (not // a UTC time). Google will reject the request if UTC offset is provided. Time - // zones will be calculated by Google based on departure airport. If this is - // not set, Google will set it based on data from other sources. + // zones will be calculated by Google based on departure airport. LocalBoardingDateTime string `json:"localBoardingDateTime,omitempty"` // LocalEstimatedOrActualArrivalDateTime: The estimated time the aircraft plans // to reach the destination gate (not the runway) or the actual time it reached @@ -2581,8 +2586,7 @@ type FlightClass struct { // millisecond precision. eg: `2027-03-05T06:30:00` This should be the local // date/time at the airport (not a UTC time). Google will reject the request if // UTC offset is provided. Time zones will be calculated by Google based on - // arrival airport. If this is not set, Google will set it based on data from - // other sources. + // arrival airport. LocalEstimatedOrActualArrivalDateTime string `json:"localEstimatedOrActualArrivalDateTime,omitempty"` // LocalEstimatedOrActualDepartureDateTime: The estimated time the aircraft // plans to pull from the gate or the actual time the aircraft already pulled @@ -2594,8 +2598,7 @@ type FlightClass struct { // offset. Time may be specified up to millisecond precision. eg: // `2027-03-05T06:30:00` This should be the local date/time at the airport (not // a UTC time). Google will reject the request if UTC offset is provided. Time - // zones will be calculated by Google based on departure airport. If this is - // not set, Google will set it based on data from other sources. + // zones will be calculated by Google based on departure airport. LocalEstimatedOrActualDepartureDateTime string `json:"localEstimatedOrActualDepartureDateTime,omitempty"` // LocalGateClosingDateTime: The gate closing time as it would be printed on // the boarding pass. Do not set this field if you do not want to print it in @@ -2613,8 +2616,7 @@ type FlightClass struct { // to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local // date/time at the airport (not a UTC time). Google will reject the request if // UTC offset is provided. Time zones will be calculated by Google based on - // arrival airport. If this is not set, Google will set it based on data from - // other sources. + // arrival airport. LocalScheduledArrivalDateTime string `json:"localScheduledArrivalDateTime,omitempty"` // LocalScheduledDepartureDateTime: Required. The scheduled date and time when // the aircraft is expected to depart the gate (not the runway) Note: This @@ -2902,6 +2904,12 @@ type FlightObject struct { ReservationInfo *ReservationInfo `json:"reservationInfo,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SecurityProgramLogo: An image for the security program that applies to the // passenger. SecurityProgramLogo *Image `json:"securityProgramLogo,omitempty"` @@ -3267,6 +3275,12 @@ type GenericObject struct { PassConstraints *PassConstraints `json:"passConstraints,omitempty"` // RotatingBarcode: The rotating barcode settings/details. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SmartTapRedemptionValue: The value that will be transmitted to a Smart Tap // certified terminal over NFC for this object. The class level fields // `enableSmartTap` and `redemptionIssuers` must also be set up correctly in @@ -3703,6 +3717,12 @@ type GiftCardObject struct { Pin string `json:"pin,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SmartTapRedemptionValue: The value that will be transmitted to a Smart Tap // certified terminal over NFC for this object. The class level fields // `enableSmartTap` and `redemptionIssuers` must also be set up correctly in @@ -4645,6 +4665,12 @@ type LoyaltyObject struct { PassConstraints *PassConstraints `json:"passConstraints,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SecondaryLoyaltyPoints: The secondary loyalty reward points label, balance, // and type. Shown in addition to the primary loyalty points. SecondaryLoyaltyPoints *LoyaltyPoints `json:"secondaryLoyaltyPoints,omitempty"` @@ -5572,6 +5598,12 @@ type OfferObject struct { PassConstraints *PassConstraints `json:"passConstraints,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SmartTapRedemptionValue: The value that will be transmitted to a Smart Tap // certified terminal over NFC for this object. The class level fields // `enableSmartTap` and `redemptionIssuers` must also be set up correctly in @@ -6137,6 +6169,43 @@ func (s RotatingBarcodeValues) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SaveRestrictions: Defines restrictions on the object that will be verified +// during save. Note: this is an advanced feature, please contact Google for +// implementation support. +type SaveRestrictions struct { + // RestrictToEmailSha256: Restrict the save of the referencing object to the + // given email address only. This is the hex output of SHA256 sum of the email + // address, all lowercase and without any notations like "." or "+", except + // "@". For example, for example@example.com, this value will be + // 31c5543c1734d25c7206f5fd591525d0295bec6fe84ff82f946a34fe970a1e66 and for + // Example@example.com, this value will be + // bc34f262c93ad7122763684ccea6f07fb7f5d8a2d11e60ce15a6f43fe70ce632 If email + // address of the logged-in user who tries to save this pass does not match + // with the defined value here, users won't be allowed to save this pass. They + // will instead be prompted with an error to contact the issuer. This + // information should be gathered from the user with an explicit consent via + // Sign in with Google integration + // https://developers.google.com/identity/authentication. Please contact with + // support before using Save Restrictions. + RestrictToEmailSha256 string `json:"restrictToEmailSha256,omitempty"` + // ForceSendFields is a list of field names (e.g. "RestrictToEmailSha256") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RestrictToEmailSha256") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SaveRestrictions) MarshalJSON() ([]byte, error) { + type NoMethod SaveRestrictions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type SecurityAnimation struct { // AnimationType: Type of animation. // @@ -6955,6 +7024,12 @@ type TransitObject struct { PurchaseDetails *PurchaseDetails `json:"purchaseDetails,omitempty"` // RotatingBarcode: The rotating barcode type and value. RotatingBarcode *RotatingBarcode `json:"rotatingBarcode,omitempty"` + // SaveRestrictions: Restrictions on the object that needs to be verified + // before the user tries to save the pass. Note that this restrictions will + // only be applied during save time. If the restrictions changed after a user + // saves the pass, the new restrictions will not be applied to an already saved + // pass. + SaveRestrictions *SaveRestrictions `json:"saveRestrictions,omitempty"` // SmartTapRedemptionValue: The value that will be transmitted to a Smart Tap // certified terminal over NFC for this object. The class level fields // `enableSmartTap` and `redemptionIssuers` must also be set up correctly in diff --git a/workflowexecutions/v1/workflowexecutions-api.json b/workflowexecutions/v1/workflowexecutions-api.json index 9047573d964..40e02ac1298 100644 --- a/workflowexecutions/v1/workflowexecutions-api.json +++ b/workflowexecutions/v1/workflowexecutions-api.json @@ -457,7 +457,7 @@ } } }, - "revision": "20240528", + "revision": "20240715", "rootUrl": "https://workflowexecutions.googleapis.com/", "schemas": { "Callback": { @@ -578,6 +578,20 @@ "description": "Output only. The error which caused the execution to finish prematurely. The value is only present if the execution's state is `FAILED` or `CANCELLED`.", "readOnly": true }, + "executionHistoryLevel": { + "description": "Optional. Describes the level of the execution history feature to apply to this execution. If not specified, the level of the execution history feature will be determined by its workflow's execution history level. If the value is different from its workflow's value, it will override the workflow's execution history level for this exeuction.", + "enum": [ + "EXECUTION_HISTORY_LEVEL_UNSPECIFIED", + "EXECUTION_HISTORY_BASIC", + "EXECUTION_HISTORY_DETAILED" + ], + "enumDescriptions": [ + "The default/unset value.", + "Enable execution history basic feature for this execution.", + "Enable execution history detailed feature for this execution." + ], + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" diff --git a/workflowexecutions/v1/workflowexecutions-gen.go b/workflowexecutions/v1/workflowexecutions-gen.go index f250531f114..17bf51450b9 100644 --- a/workflowexecutions/v1/workflowexecutions-gen.go +++ b/workflowexecutions/v1/workflowexecutions-gen.go @@ -340,6 +340,19 @@ type Execution struct { // prematurely. The value is only present if the execution's state is `FAILED` // or `CANCELLED`. Error *Error `json:"error,omitempty"` + // ExecutionHistoryLevel: Optional. Describes the level of the execution + // history feature to apply to this execution. If not specified, the level of + // the execution history feature will be determined by its workflow's execution + // history level. If the value is different from its workflow's value, it will + // override the workflow's execution history level for this exeuction. + // + // Possible values: + // "EXECUTION_HISTORY_LEVEL_UNSPECIFIED" - The default/unset value. + // "EXECUTION_HISTORY_BASIC" - Enable execution history basic feature for + // this execution. + // "EXECUTION_HISTORY_DETAILED" - Enable execution history detailed feature + // for this execution. + ExecutionHistoryLevel string `json:"executionHistoryLevel,omitempty"` // Labels: Labels associated with this execution. 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/workflows/v1/workflows-api.json b/workflows/v1/workflows-api.json index d2aae5e170e..6b0fbe3846d 100644 --- a/workflows/v1/workflows-api.json +++ b/workflows/v1/workflows-api.json @@ -485,7 +485,7 @@ } } }, - "revision": "20240605", + "revision": "20240710", "rootUrl": "https://workflows.googleapis.com/", "schemas": { "Empty": { @@ -722,7 +722,7 @@ "type": "object" }, "Workflow": { - "description": "Workflow program to be executed by Workflows.", + "description": "LINT.IfChange Workflow program to be executed by Workflows.", "id": "Workflow", "properties": { "allKmsKeys": { diff --git a/workflows/v1/workflows-gen.go b/workflows/v1/workflows-gen.go index 2634f80e6a9..3e6d6fb42a5 100644 --- a/workflows/v1/workflows-gen.go +++ b/workflows/v1/workflows-gen.go @@ -501,7 +501,7 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// Workflow: Workflow program to be executed by Workflows. +// Workflow: LINT.IfChange Workflow program to be executed by Workflows. type Workflow struct { // AllKmsKeys: Output only. A list of all KMS crypto keys used to encrypt or // decrypt the data associated with the workflow. diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index 7fe92bf359c..9ea5dbc209c 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -1195,7 +1195,7 @@ } } }, - "revision": "20240709", + "revision": "20240716", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1435,7 +1435,7 @@ "type": "boolean" }, "enableNestedVirtualization": { - "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", + "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series.", "type": "boolean" }, "machineType": { @@ -2356,7 +2356,7 @@ "type": "string" }, "enableAuditAgent": { - "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", + "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](http://cloud/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", "type": "boolean" }, "encryptionKey": { diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index 8e7ec8f1810..1d117a4a719 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -652,10 +652,11 @@ type GceInstance struct { DisableSsh bool `json:"disableSsh,omitempty"` // EnableNestedVirtualization: Optional. Whether to enable nested // virtualization on Cloud Workstations VMs created using this workstation - // configuration. Nested virtualization lets you run virtual machine (VM) - // instances inside your workstation. Before enabling nested virtualization, - // consider the following important considerations. Cloud Workstations - // instances are subject to the same restrictions as Compute Engine instances + // configuration. Defaults to false. Nested virtualization lets you run virtual + // machine (VM) instances inside your workstation. Before enabling nested + // virtualization, consider the following important considerations. Cloud + // Workstations instances are subject to the same restrictions as Compute + // Engine instances // (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): // * **Organization policy**: projects, folders, or organizations may be // restricted from creating nested VMs if the **Disable VM nested @@ -667,13 +668,7 @@ type GceInstance struct { // performance for workloads that are CPU-bound and possibly greater than a 10% // decrease for workloads that are input/output bound. * **Machine Type**: // nested virtualization can only be enabled on workstation configurations that - // specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested - // virtualization may not be enabled on workstation configurations with - // accelerators. * **Operating System**: because Container-Optimized OS - // (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) - // does not support nested virtualization, when nested virtualization is - // enabled, the underlying Compute Engine VM instances boot from an Ubuntu LTS - // (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image. + // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` // MachineType: Optional. The type of machine to use for VM instances—for // example, "e2-standard-4". For more information about machine types that @@ -1848,10 +1843,15 @@ type WorkstationConfig struct { // configuration. DisplayName string `json:"displayName,omitempty"` // EnableAuditAgent: Optional. Whether to enable Linux `auditd` logging on the - // workstation. When enabled, a service account must also be specified that has - // `logging.buckets.write` permission on the project. Operating system audit - // logging is distinct from Cloud Audit Logs - // (https://cloud.google.com/workstations/docs/audit-logging). + // workstation. When enabled, a service_account must also be specified that has + // `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the + // project. Operating system audit logging is distinct from Cloud Audit Logs + // (https://cloud.google.com/workstations/docs/audit-logging) and Container + // output logging + // (http://cloud/workstations/docs/container-output-logging#overview). + // Operating system audit logs are available in the Cloud Logging + // (https://cloud.google.com/logging/docs) console by querying: + // resource.type="gce_instance" log_name:"/logs/linux-auditd" EnableAuditAgent bool `json:"enableAuditAgent,omitempty"` // EncryptionKey: Immutable. Encrypts resources of this workstation // configuration using a customer-managed encryption key (CMEK). If specified, diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 99ebf1e03a5..eb7f759c358 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -1127,7 +1127,7 @@ } } }, - "revision": "20240709", + "revision": "20240716", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1233,7 +1233,7 @@ "type": "integer" }, "enableNestedVirtualization": { - "description": "Optional. Whether to enable nested virtualization on boosted Cloud Workstations VMs running using this boost configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on boost configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on boost configurations with accelerators. * **Operating System**: Because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image. Defaults to false.", + "description": "Optional. Whether to enable nested virtualization on boosted Cloud Workstations VMs running using this boost configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on boost configurations that specify a machine_type in the N1 or N2 machine series.", "type": "boolean" }, "id": { @@ -1410,7 +1410,7 @@ "type": "boolean" }, "enableNestedVirtualization": { - "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", + "description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Defaults to false. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series.", "type": "boolean" }, "machineType": { @@ -2051,6 +2051,14 @@ "description": "Optional. Client-specified annotations.", "type": "object" }, + "boostConfigs": { + "description": "Output only. List of available boost configuration ids that this workstation can be boosted up to", + "items": { + "$ref": "WorkstationBoostConfig" + }, + "readOnly": true, + "type": "array" + }, "createTime": { "description": "Output only. Time when this workstation was created.", "format": "google-datetime", @@ -2157,6 +2165,18 @@ }, "type": "object" }, + "WorkstationBoostConfig": { + "description": "Boost config for this workstation. This object is populated from the parent workstation config.", + "id": "WorkstationBoostConfig", + "properties": { + "id": { + "description": "Output only. Boost config id.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "WorkstationCluster": { "description": "A workstation cluster resource in the Cloud Workstations API. Defines a group of workstations in a particular region and the VPC network they're attached to.", "id": "WorkstationCluster", @@ -2318,7 +2338,7 @@ "type": "string" }, "enableAuditAgent": { - "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", + "description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service_account must also be specified that has `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging) and [Container output logging](http://cloud/workstations/docs/container-output-logging#overview). Operating system audit logs are available in the [Cloud Logging](https://cloud.google.com/logging/docs) console by querying: resource.type=\"gce_instance\" log_name:\"/logs/linux-auditd\"", "type": "boolean" }, "encryptionKey": { diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 743ebafc524..4e5aa8f0d3b 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -433,10 +433,11 @@ type BoostConfig struct { BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"` // EnableNestedVirtualization: Optional. Whether to enable nested // virtualization on boosted Cloud Workstations VMs running using this boost - // configuration. Nested virtualization lets you run virtual machine (VM) - // instances inside your workstation. Before enabling nested virtualization, - // consider the following important considerations. Cloud Workstations - // instances are subject to the same restrictions as Compute Engine instances + // configuration. Defaults to false. Nested virtualization lets you run virtual + // machine (VM) instances inside your workstation. Before enabling nested + // virtualization, consider the following important considerations. Cloud + // Workstations instances are subject to the same restrictions as Compute + // Engine instances // (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): // * **Organization policy**: projects, folders, or organizations may be // restricted from creating nested VMs if the **Disable VM nested @@ -448,14 +449,7 @@ type BoostConfig struct { // performance for workloads that are CPU-bound and possibly greater than a 10% // decrease for workloads that are input/output bound. * **Machine Type**: // nested virtualization can only be enabled on boost configurations that - // specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested - // virtualization may not be enabled on boost configurations with accelerators. - // * **Operating System**: Because Container-Optimized OS - // (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) - // does not support nested virtualization, when nested virtualization is - // enabled, the underlying Compute Engine VM instances boot from an Ubuntu LTS - // (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image. - // Defaults to false. + // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` // Id: Optional. Required. The id to be used for the boost config. Id string `json:"id,omitempty"` @@ -718,10 +712,11 @@ type GceInstance struct { DisableSsh bool `json:"disableSsh,omitempty"` // EnableNestedVirtualization: Optional. Whether to enable nested // virtualization on Cloud Workstations VMs created using this workstation - // configuration. Nested virtualization lets you run virtual machine (VM) - // instances inside your workstation. Before enabling nested virtualization, - // consider the following important considerations. Cloud Workstations - // instances are subject to the same restrictions as Compute Engine instances + // configuration. Defaults to false. Nested virtualization lets you run virtual + // machine (VM) instances inside your workstation. Before enabling nested + // virtualization, consider the following important considerations. Cloud + // Workstations instances are subject to the same restrictions as Compute + // Engine instances // (https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): // * **Organization policy**: projects, folders, or organizations may be // restricted from creating nested VMs if the **Disable VM nested @@ -733,13 +728,7 @@ type GceInstance struct { // performance for workloads that are CPU-bound and possibly greater than a 10% // decrease for workloads that are input/output bound. * **Machine Type**: // nested virtualization can only be enabled on workstation configurations that - // specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested - // virtualization may not be enabled on workstation configurations with - // accelerators. * **Operating System**: because Container-Optimized OS - // (https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) - // does not support nested virtualization, when nested virtualization is - // enabled, the underlying Compute Engine VM instances boot from an Ubuntu LTS - // (https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image. + // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` // MachineType: Optional. The type of machine to use for VM instances—for // example, "e2-standard-4". For more information about machine types that @@ -1690,6 +1679,9 @@ func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { type Workstation struct { // Annotations: Optional. Client-specified annotations. Annotations map[string]string `json:"annotations,omitempty"` + // BoostConfigs: Output only. List of available boost configuration ids that + // this workstation can be boosted up to + BoostConfigs []*WorkstationBoostConfig `json:"boostConfigs,omitempty"` // CreateTime: Output only. Time when this workstation was created. CreateTime string `json:"createTime,omitempty"` // DeleteTime: Output only. Time when this workstation was soft-deleted. @@ -1770,6 +1762,29 @@ func (s Workstation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// WorkstationBoostConfig: Boost config for this workstation. This object is +// populated from the parent workstation config. +type WorkstationBoostConfig struct { + // Id: Output only. Boost config id. + Id string `json:"id,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 WorkstationBoostConfig) MarshalJSON() ([]byte, error) { + type NoMethod WorkstationBoostConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // WorkstationCluster: A workstation cluster resource in the Cloud Workstations // API. Defines a group of workstations in a particular region and the VPC // network they're attached to. @@ -1893,10 +1908,15 @@ type WorkstationConfig struct { // configuration. DisplayName string `json:"displayName,omitempty"` // EnableAuditAgent: Optional. Whether to enable Linux `auditd` logging on the - // workstation. When enabled, a service account must also be specified that has - // `logging.buckets.write` permission on the project. Operating system audit - // logging is distinct from Cloud Audit Logs - // (https://cloud.google.com/workstations/docs/audit-logging). + // workstation. When enabled, a service_account must also be specified that has + // `roles/logging.logWriter` and `roles/monitoring.metricWriter` on the + // project. Operating system audit logging is distinct from Cloud Audit Logs + // (https://cloud.google.com/workstations/docs/audit-logging) and Container + // output logging + // (http://cloud/workstations/docs/container-output-logging#overview). + // Operating system audit logs are available in the Cloud Logging + // (https://cloud.google.com/logging/docs) console by querying: + // resource.type="gce_instance" log_name:"/logs/linux-auditd" EnableAuditAgent bool `json:"enableAuditAgent,omitempty"` // EncryptionKey: Immutable. Encrypts resources of this workstation // configuration using a customer-managed encryption key (CMEK). If specified,