From 9f414c51d88a7f77033a3dc3496ff26bf9512203 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 7 Dec 2024 08:13:35 +0000 Subject: [PATCH] feat(all): auto-regenerate discovery clients --- bigquery/v2/bigquery-api.json | 10 +- bigquery/v2/bigquery-gen.go | 8 +- chat/v1/chat-api.json | 4 +- chat/v1/chat-gen.go | 19 +- connectors/v1/connectors-api.json | 228 +- connectors/v1/connectors-gen.go | 423 +- discoveryengine/v1/discoveryengine-api.json | 616 ++- discoveryengine/v1/discoveryengine-gen.go | 1415 ++++++- .../v1alpha/discoveryengine-api.json | 616 ++- .../v1alpha/discoveryengine-gen.go | 1260 +++++- .../v1beta/discoveryengine-api.json | 825 +++- discoveryengine/v1beta/discoveryengine-gen.go | 1370 ++++++- displayvideo/v2/displayvideo-api.json | 16 +- displayvideo/v2/displayvideo-gen.go | 10 +- displayvideo/v3/displayvideo-api.json | 26 +- displayvideo/v3/displayvideo-gen.go | 19 +- dlp/v2/dlp-api.json | 6 +- dlp/v2/dlp-gen.go | 2 + firebaseml/v2beta/firebaseml-api.json | 34 +- firebaseml/v2beta/firebaseml-gen.go | 20 +- metastore/v1alpha/metastore-api.json | 6 +- metastore/v1alpha/metastore-gen.go | 6 +- metastore/v2/metastore-api.json | 1813 ++++++++ metastore/v2/metastore-gen.go | 3639 +++++++++++++++++ .../v1beta1/networkservices-api.json | 6 +- .../v1beta1/networkservices-gen.go | 4 +- tagmanager/v2/tagmanager-api.json | 6 +- tagmanager/v2/tagmanager-gen.go | 3 + 28 files changed, 11922 insertions(+), 488 deletions(-) create mode 100644 metastore/v2/metastore-api.json create mode 100644 metastore/v2/metastore-gen.go diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 6d546a35907..286f3cbe44b 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -254,7 +254,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the access policy schema to fetch. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for conditional access policy binding in datasets must specify version 3. Dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. This field will be maped to [IAM Policy version] (https://cloud.google.com/iam/docs/policies#versions) and will be used to fetch policy from IAM. If unset or if 0 or 1 value is used for dataset with conditional bindings, access entry with condition will have role string appended by 'withcond' string followed by a hash value. For example : { \"access\": [ { \"role\": \"roles/bigquery.dataViewer_with_conditionalbinding_7a34awqsda\", \"userByEmail\": \"user@example.com\", } ] } Please refer https://cloud.google.com/iam/docs/troubleshooting-withcond for more details.", + "description": "Optional. The version of the access policy schema to fetch. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for conditional access policy binding in datasets must specify version 3. Dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. This field will be mapped to [IAM Policy version] (https://cloud.google.com/iam/docs/policies#versions) and will be used to fetch policy from IAM. If unset or if 0 or 1 value is used for dataset with conditional bindings, access entry with condition will have role string appended by 'withcond' string followed by a hash value. For example : { \"access\": [ { \"role\": \"roles/bigquery.dataViewer_with_conditionalbinding_7a34awqsda\", \"userByEmail\": \"user@example.com\", } ] } Please refer https://cloud.google.com/iam/docs/troubleshooting-withcond for more details.", "format": "int32", "location": "query", "type": "integer" @@ -311,7 +311,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Requests with conditional access policy binding in datasets must specify version 3. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Requests with conditional access policy binding in datasets must specify version 3. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -395,7 +395,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -475,7 +475,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -2009,7 +2009,7 @@ } } }, - "revision": "20241111", + "revision": "20241115", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 25e95d28efd..be5e1b7f40b 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -10484,7 +10484,7 @@ func (r *DatasetsService) Get(projectId string, datasetId string) *DatasetsGetCa // Requests specifying an invalid value will be rejected. Requests for // conditional access policy binding in datasets must specify version 3. // Dataset with no conditional role bindings in access policy may specify any -// valid value or leave the field unset. This field will be maped to [IAM +// valid value or leave the field unset. This field will be mapped to [IAM // Policy version] (https://cloud.google.com/iam/docs/policies#versions) and // will be used to fetch policy from IAM. If unset or if 0 or 1 value is used // for dataset with conditional bindings, access entry with condition will have @@ -10637,7 +10637,7 @@ func (r *DatasetsService) Insert(projectId string, dataset *Dataset) *DatasetsIn // access policy binding in datasets must specify version 3. * But dataset with // no conditional role bindings in access policy may specify any valid value or // leave the field unset. If unset or if 0 or 1 value is used for dataset with -// conditional bindings, request will be rejected. This field will be maped to +// conditional bindings, request will be rejected. This field will be mapped to // IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and // will be used to set policy in IAM. func (c *DatasetsInsertCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsInsertCall { @@ -10927,7 +10927,7 @@ func (r *DatasetsService) Patch(projectId string, datasetId string, dataset *Dat // entry with condition. * But dataset with no conditional role bindings in // access policy may specify any valid value or leave the field unset. If unset // or if 0 or 1 value is used for dataset with conditional bindings, request -// will be rejected. This field will be maped to IAM Policy version +// will be rejected. This field will be mapped to IAM Policy version // (https://cloud.google.com/iam/docs/policies#versions) and will be used to // set policy in IAM. func (c *DatasetsPatchCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsPatchCall { @@ -11161,7 +11161,7 @@ func (r *DatasetsService) Update(projectId string, datasetId string, dataset *Da // entry with condition. * But dataset with no conditional role bindings in // access policy may specify any valid value or leave the field unset. If unset // or if 0 or 1 value is used for dataset with conditional bindings, request -// will be rejected. This field will be maped to IAM Policy version +// will be rejected. This field will be mapped to IAM Policy version // (https://cloud.google.com/iam/docs/policies#versions) and will be used to // set policy in IAM. func (c *DatasetsUpdateCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsUpdateCall { diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 1c52f20374f..094d4e4a854 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -290,7 +290,7 @@ ] }, "create": { - "description": "Creates a space with no members. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) When authenticating as an app, the `space.customer` field must be set in the request.", + "description": "Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) When authenticating as an app, the `space.customer` field must be set in the request. Space membership upon creation depends on whether the space is created in `Import mode`: * **Import mode:** No members are created. * **All other modes:** The calling user is added as a member. This is: * The app itself when using app authentication. * The human user when using user authentication. If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -1344,7 +1344,7 @@ } } }, - "revision": "20241124", + "revision": "20241203", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 126bd37621a..bcb9693f1c1 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -6277,13 +6277,10 @@ type SpacesCreateCall struct { header_ http.Header } -// Create: Creates a space with no members. Can be used to create a named -// space, or a group chat in `Import mode`. For an example, see Create a space -// (https://developers.google.com/workspace/chat/create-spaces). If you receive -// the error message `ALREADY_EXISTS` when creating a space, try a different -// `displayName`. An existing space within the Google Workspace organization -// might already use this display name. Supports the following types of -// authentication +// Create: Creates a space. Can be used to create a named space, or a group +// chat in `Import mode`. For an example, see Create a space +// (https://developers.google.com/workspace/chat/create-spaces). Supports the +// following types of authentication // (https://developers.google.com/workspace/chat/authenticate-authorize): - App // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) @@ -6292,7 +6289,13 @@ type SpacesCreateCall struct { // User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // When authenticating as an app, the `space.customer` field must be set in the -// request. +// request. Space membership upon creation depends on whether the space is +// created in `Import mode`: * **Import mode:** No members are created. * **All +// other modes:** The calling user is added as a member. This is: * The app +// itself when using app authentication. * The human user when using user +// authentication. If you receive the error message `ALREADY_EXISTS` when +// creating a space, try a different `displayName`. An existing space within +// the Google Workspace organization might already use this display name. func (r *SpacesService) Create(space *Space) *SpacesCreateCall { c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.space = space diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index e9a350b3b1b..928b6ab03a5 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1245,6 +1245,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "publish": { + "description": "Publish request for the CustomConnectorVersion. Once approved, the CustomConnectorVersion will be published as PartnerConnector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customConnectors/{customConnectorsId}/customConnectorVersions/{customConnectorVersionsId}:publish", + "httpMethod": "POST", + "id": "connectors.projects.locations.customConnectors.customConnectorVersions.publish", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the form: `projects/{project}/locations/{location}/customConnectors/{custom_connector}/customConnectorVersions/{custom_connector_version}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/customConnectors/[^/]+/customConnectorVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:publish", + "request": { + "$ref": "PublishCustomConnectorVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "withdraw": { + "description": "Withdraw the publish request for the CustomConnectorVersion. This can only be used before the CustomConnectorVersion is published.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customConnectors/{customConnectorsId}/customConnectorVersions/{customConnectorVersionsId}:withdraw", + "httpMethod": "POST", + "id": "connectors.projects.locations.customConnectors.customConnectorVersions.withdraw", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the form: `projects/{project}/locations/{location}/customConnectors/{custom_connector}/customConnectorVersions/{custom_connector_version}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/customConnectors/[^/]+/customConnectorVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:withdraw", + "request": { + "$ref": "WithdrawCustomConnectorVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -1949,7 +2005,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "connectors.projects.locations.operations.cancel", @@ -2502,7 +2558,7 @@ } } }, - "revision": "20241105", + "revision": "20241203", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2804,7 +2860,7 @@ "id": "AuthorizationCodeLink", "properties": { "clientId": { - "description": "The client ID assigned to the Google Cloud Connectors OAuth app for the connector data source.", + "description": "Optional. The client ID assigned to the Google Cloud Connectors OAuth app for the connector data source.", "type": "string" }, "clientSecret": { @@ -2812,7 +2868,7 @@ "description": "Optional. The client secret assigned to the Google Cloud Connectors OAuth app for the connector data source." }, "enablePkce": { - "description": "Whether to enable PKCE for the auth code flow.", + "description": "Optional. Whether to enable PKCE for the auth code flow.", "type": "boolean" }, "omitQueryParams": { @@ -2820,14 +2876,14 @@ "type": "boolean" }, "scopes": { - "description": "The scopes for which the user will authorize Google Cloud Connectors on the connector data source.", + "description": "Optional. The scopes for which the user will authorize Google Cloud Connectors on the connector data source.", "items": { "type": "string" }, "type": "array" }, "uri": { - "description": "The base URI the user must click to trigger the authorization code login flow.", + "description": "Optional. The base URI the user must click to trigger the authorization code login flow.", "type": "string" } }, @@ -2921,18 +2977,18 @@ "properties": { "authorizationCodeLink": { "$ref": "AuthorizationCodeLink", - "description": "Authorization code link options. To be populated if `ValueType` is `AUTHORIZATION_CODE`" + "description": "Optional. Authorization code link options. To be populated if `ValueType` is `AUTHORIZATION_CODE`" }, "description": { - "description": "Description.", + "description": "Optional. Description.", "type": "string" }, "displayName": { - "description": "Display name of the parameter.", + "description": "Optional. Display name of the parameter.", "type": "string" }, "enumOptions": { - "description": "Enum options. To be populated if `ValueType` is `ENUM`", + "description": "Optional. Enum options. To be populated if `ValueType` is `ENUM`", "items": { "$ref": "EnumOption" }, @@ -2951,11 +3007,11 @@ "type": "string" }, "isAdvanced": { - "description": "Indicates if current template is part of advanced settings", + "description": "Optional. Indicates if current template is part of advanced settings", "type": "boolean" }, "key": { - "description": "Key of the config variable.", + "description": "Optional. Key of the config variable.", "type": "string" }, "locationType": { @@ -2981,19 +3037,19 @@ "description": "Optional. MultipleSelectConfig represents the multiple options for a config variable." }, "required": { - "description": "Flag represents that this `ConfigVariable` must be provided for a connection.", + "description": "Optional. Flag represents that this `ConfigVariable` must be provided for a connection.", "type": "boolean" }, "requiredCondition": { "$ref": "LogicalExpression", - "description": "Condition under which a field would be required. The condition can be represented in the form of a logical expression." + "description": "Optional. Condition under which a field would be required. The condition can be represented in the form of a logical expression." }, "roleGrant": { "$ref": "RoleGrant", - "description": "Role grant configuration for the config variable." + "description": "Optional. Role grant configuration for the config variable." }, "state": { - "description": "State of the config variable.", + "description": "Output only. State of the config variable.", "enum": [ "STATE_UNSPECIFIED", "ACTIVE", @@ -3004,14 +3060,15 @@ "Config variable is active", "Config variable is deprecated." ], + "readOnly": true, "type": "string" }, "validationRegex": { - "description": "Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.", + "description": "Optional. Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.", "type": "string" }, "valueType": { - "description": "Type of the parameter: string, int, bool etc. consider custom type for the benefit for the validation.", + "description": "Optional. Type of the parameter: string, int, bool etc. consider custom type for the benefit for the validation.", "enum": [ "VALUE_TYPE_UNSPECIFIED", "STRING", @@ -3089,6 +3146,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3096,6 +3154,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -3416,6 +3475,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3423,11 +3483,17 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, "type": "string" }, + "marketplaceConnectorDetails": { + "$ref": "MarketplaceConnectorDetails", + "description": "Output only. Marketplace connector details. Will be null if the connector is not marketplace connector.", + "readOnly": true + }, "name": { "description": "Output only. Resource name of the Connector. Format: projects/{project}/locations/{location}/providers/{provider}/connectors/{connector} Only global location is supported for Connector resource.", "readOnly": true, @@ -3621,6 +3687,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3628,6 +3695,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -3726,7 +3794,7 @@ "type": "string" }, "deploymentModel": { - "description": "Optional. Indicates whether connector is deployed on GKE/CloudRun", + "description": "Output only. Indicates whether connector is deployed on GKE/CloudRun", "enum": [ "DEPLOYMENT_MODEL_UNSPECIFIED", "GKE_MST", @@ -3737,6 +3805,7 @@ "Default model gke mst.", "Cloud run mst." ], + "readOnly": true, "type": "string" }, "deploymentModelMigrationState": { @@ -4370,11 +4439,11 @@ "id": "EnumOption", "properties": { "displayName": { - "description": "Display name of the option.", + "description": "Optional. Display name of the option.", "type": "string" }, "id": { - "description": "Id of the option.", + "description": "Optional. Id of the option.", "type": "string" } }, @@ -4442,6 +4511,10 @@ "$ref": "EndPoint", "description": "OPTION 1: Hit an endpoint when we receive an event." }, + "gsutil": { + "$ref": "GSUtil", + "description": "OPTION 2: Write the event to Cloud Storage bucket." + }, "serviceAccount": { "description": "Service account needed for runtime plane to trigger IP workflow.", "type": "string" @@ -4450,11 +4523,15 @@ "description": "type of the destination", "enum": [ "TYPE_UNSPECIFIED", - "ENDPOINT" + "ENDPOINT", + "GCS", + "PUBSUB" ], "enumDescriptions": [ "Default state.", - "Endpoint - Hit the value of endpoint when event is received" + "Endpoint - Hit the value of endpoint when event is received", + "Cloud Storage - Write the event to Cloud Storage bucket", + "Pub/Sub - Write the event to Pub/Sub topic" ], "type": "string" } @@ -4548,7 +4625,7 @@ "id": "EventingConfig", "properties": { "additionalVariables": { - "description": "Additional eventing related field values", + "description": "Optional. Additional eventing related field values", "items": { "$ref": "ConfigVariable" }, @@ -4556,14 +4633,14 @@ }, "authConfig": { "$ref": "AuthConfig", - "description": "Auth details for the webhook adapter." + "description": "Optional. Auth details for the webhook adapter." }, "deadLetterConfig": { "$ref": "DeadLetterConfig", "description": "Optional. Dead letter configuration for eventing of a connection." }, "enrichmentEnabled": { - "description": "Enrichment Enabled.", + "description": "Optional. Enrichment Enabled.", "type": "boolean" }, "eventsListenerIngressEndpoint": { @@ -4584,7 +4661,7 @@ }, "registrationDestinationConfig": { "$ref": "DestinationConfig", - "description": "Registration endpoint for auto registration." + "description": "Optional. Registration endpoint for auto registration." } }, "type": "object" @@ -4697,6 +4774,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -4704,6 +4782,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -5068,7 +5147,7 @@ "type": "boolean" }, "comparator": { - "description": "Comparator to use for comparing the field value.", + "description": "Optional. Comparator to use for comparing the field value.", "enum": [ "COMPARATOR_UNSPECIFIED", "EQUALS", @@ -5087,7 +5166,7 @@ "type": "string" }, "key": { - "description": "Key of the field.", + "description": "Optional. Key of the field.", "type": "string" }, "stringValue": { @@ -5097,6 +5176,17 @@ }, "type": "object" }, + "GSUtil": { + "description": "GSUtil message includes details of the Destination Cloud Storage bucket.", + "id": "GSUtil", + "properties": { + "gsutilUri": { + "description": "Required. The URI of the Cloud Storage bucket.", + "type": "string" + } + }, + "type": "object" + }, "HPAConfig": { "description": "Autoscaling config for connector deployment system metrics.", "id": "HPAConfig", @@ -6103,21 +6193,21 @@ "id": "LogicalExpression", "properties": { "fieldComparisons": { - "description": "A list of fields to be compared.", + "description": "Optional. A list of fields to be compared.", "items": { "$ref": "FieldComparison" }, "type": "array" }, "logicalExpressions": { - "description": "A list of nested conditions to be compared.", + "description": "Optional. A list of nested conditions to be compared.", "items": { "$ref": "LogicalExpression" }, "type": "array" }, "logicalOperator": { - "description": "The logical operator to use between the fields and conditions.", + "description": "Optional. The logical operator to use between the fields and conditions.", "enum": [ "OPERATOR_UNSPECIFIED", "AND", @@ -6298,6 +6388,29 @@ }, "type": "object" }, + "MarketplaceConnectorDetails": { + "description": "Marketplace connector details.", + "id": "MarketplaceConnectorDetails", + "properties": { + "marketplaceProduct": { + "description": "Marketplace product name.", + "type": "string" + }, + "marketplaceProductId": { + "description": "Marketplace product ID.", + "type": "string" + }, + "marketplaceProductUri": { + "description": "Marketplace product URL.", + "type": "string" + }, + "partner": { + "description": "The name of the partner.", + "type": "string" + } + }, + "type": "object" + }, "MultipleSelectConfig": { "description": "MultipleSelectConfig represents the multiple options for a config variable.", "id": "MultipleSelectConfig", @@ -6754,6 +6867,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -6761,6 +6875,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -6800,6 +6915,17 @@ }, "type": "object" }, + "PublishCustomConnectorVersionRequest": { + "description": "Request message for ConnectorsService.PublishCustomConnectorVersion", + "id": "PublishCustomConnectorVersionRequest", + "properties": { + "partnerMetadata": { + "$ref": "PartnerMetadata", + "description": "Required. Partner metadata details for validating and publishing the custom connector as a partner connector version." + } + }, + "type": "object" + }, "PublishStatus": { "description": "Publish status of a custom connector.", "id": "PublishStatus", @@ -6882,11 +7008,11 @@ "id": "Resource", "properties": { "pathTemplate": { - "description": "Template to uniquely represent a Google Cloud resource in a format IAM expects This is a template that can have references to other values provided in the config variable template.", + "description": "Optional. Template to uniquely represent a Google Cloud resource in a format IAM expects This is a template that can have references to other values provided in the config variable template.", "type": "string" }, "type": { - "description": "Different types of resource supported.", + "description": "Optional. Different types of resource supported.", "enum": [ "TYPE_UNSPECIFIED", "GCP_PROJECT", @@ -7123,11 +7249,11 @@ "id": "RoleGrant", "properties": { "helperTextTemplate": { - "description": "Template that UI can use to provide helper text to customers.", + "description": "Optional. Template that UI can use to provide helper text to customers.", "type": "string" }, "principal": { - "description": "Prinicipal/Identity for whom the role need to assigned.", + "description": "Optional. Prinicipal/Identity for whom the role need to assigned.", "enum": [ "PRINCIPAL_UNSPECIFIED", "CONNECTOR_SA" @@ -7140,10 +7266,10 @@ }, "resource": { "$ref": "Resource", - "description": "Resource on which the roles needs to be granted for the principal." + "description": "Optional. Resource on which the roles needs to be granted for the principal." }, "roles": { - "description": "List of roles that need to be granted.", + "description": "Optional. List of roles that need to be granted.", "items": { "type": "string" }, @@ -7585,14 +7711,14 @@ "id": "SslConfig", "properties": { "additionalVariables": { - "description": "Additional SSL related field values", + "description": "Optional. Additional SSL related field values", "items": { "$ref": "ConfigVariable" }, "type": "array" }, "clientCertType": { - "description": "Type of Client Cert (PEM/JKS/.. etc.)", + "description": "Optional. Type of Client Cert (PEM/JKS/.. etc.)", "enum": [ "CERT_TYPE_UNSPECIFIED", "PEM" @@ -7605,22 +7731,22 @@ }, "clientCertificate": { "$ref": "Secret", - "description": "Client Certificate" + "description": "Optional. Client Certificate" }, "clientPrivateKey": { "$ref": "Secret", - "description": "Client Private Key" + "description": "Optional. Client Private Key" }, "clientPrivateKeyPass": { "$ref": "Secret", - "description": "Secret containing the passphrase protecting the Client Private Key" + "description": "Optional. Secret containing the passphrase protecting the Client Private Key" }, "privateServerCertificate": { "$ref": "Secret", - "description": "Private Server Certificate. Needs to be specified if trust model is `PRIVATE`." + "description": "Optional. Private Server Certificate. Needs to be specified if trust model is `PRIVATE`." }, "serverCertType": { - "description": "Type of Server Cert (PEM/JKS/.. etc.)", + "description": "Optional. Type of Server Cert (PEM/JKS/.. etc.)", "enum": [ "CERT_TYPE_UNSPECIFIED", "PEM" @@ -7632,7 +7758,7 @@ "type": "string" }, "trustModel": { - "description": "Trust Model of the SSL connection", + "description": "Optional. Trust Model of the SSL connection", "enum": [ "PUBLIC", "PRIVATE", @@ -7646,7 +7772,7 @@ "type": "string" }, "type": { - "description": "Controls the ssl type for the given connector version.", + "description": "Optional. Controls the ssl type for the given connector version.", "enum": [ "SSL_TYPE_UNSPECIFIED", "TLS", @@ -7660,7 +7786,7 @@ "type": "string" }, "useSsl": { - "description": "Bool for enabling SSL", + "description": "Optional. Bool for enabling SSL", "type": "boolean" } }, @@ -8015,6 +8141,12 @@ } }, "type": "object" + }, + "WithdrawCustomConnectorVersionRequest": { + "description": "Request message for ConnectorsService.WithdrawCustomConnectorVersion", + "id": "WithdrawCustomConnectorVersionRequest", + "properties": {}, + "type": "object" } }, "servicePath": "", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 535235d1c23..d37cdae3d5d 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -685,21 +685,21 @@ func (s AuthSchema) MarshalJSON() ([]byte, error) { // AuthorizationCodeLink: This configuration captures the details required to // render an authorization link for the OAuth Authorization Code Flow. type AuthorizationCodeLink struct { - // ClientId: The client ID assigned to the Google Cloud Connectors OAuth app - // for the connector data source. + // ClientId: Optional. The client ID assigned to the Google Cloud Connectors + // OAuth app for the connector data source. ClientId string `json:"clientId,omitempty"` // ClientSecret: Optional. The client secret assigned to the Google Cloud // Connectors OAuth app for the connector data source. ClientSecret *Secret `json:"clientSecret,omitempty"` - // EnablePkce: Whether to enable PKCE for the auth code flow. + // EnablePkce: Optional. Whether to enable PKCE for the auth code flow. EnablePkce bool `json:"enablePkce,omitempty"` // OmitQueryParams: Optional. Omit query params from the redirect URI. OmitQueryParams bool `json:"omitQueryParams,omitempty"` - // Scopes: The scopes for which the user will authorize Google Cloud Connectors - // on the connector data source. + // Scopes: Optional. The scopes for which the user will authorize Google Cloud + // Connectors on the connector data source. Scopes []string `json:"scopes,omitempty"` - // Uri: The base URI the user must click to trigger the authorization code - // login flow. + // Uri: Optional. The base URI the user must click to trigger the authorization + // code login flow. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with empty or @@ -885,14 +885,15 @@ func (s ConfigVariable) MarshalJSON() ([]byte, error) { // ConfigVariableTemplate: ConfigVariableTemplate provides metadata about a // `ConfigVariable` that is used in a Connection. type ConfigVariableTemplate struct { - // AuthorizationCodeLink: Authorization code link options. To be populated if - // `ValueType` is `AUTHORIZATION_CODE` + // AuthorizationCodeLink: Optional. Authorization code link options. To be + // populated if `ValueType` is `AUTHORIZATION_CODE` AuthorizationCodeLink *AuthorizationCodeLink `json:"authorizationCodeLink,omitempty"` - // Description: Description. + // Description: Optional. Description. Description string `json:"description,omitempty"` - // DisplayName: Display name of the parameter. + // DisplayName: Optional. Display name of the parameter. DisplayName string `json:"displayName,omitempty"` - // EnumOptions: Enum options. To be populated if `ValueType` is `ENUM` + // EnumOptions: Optional. Enum options. To be populated if `ValueType` is + // `ENUM` EnumOptions []*EnumOption `json:"enumOptions,omitempty"` // EnumSource: Optional. enum source denotes the source of api to fill the enum // options @@ -901,9 +902,10 @@ type ConfigVariableTemplate struct { // "ENUM_SOURCE_UNSPECIFIED" - Api type unspecified. // "EVENT_TYPES_API" - list event types. EnumSource string `json:"enumSource,omitempty"` - // IsAdvanced: Indicates if current template is part of advanced settings + // IsAdvanced: Optional. Indicates if current template is part of advanced + // settings IsAdvanced bool `json:"isAdvanced,omitempty"` - // Key: Key of the config variable. + // Key: Optional. Key of the config variable. Key string `json:"key,omitempty"` // LocationType: Optional. Location Tyep denotes where this value should be // sent in BYOC connections. @@ -918,26 +920,27 @@ type ConfigVariableTemplate struct { // MultipleSelectConfig: Optional. MultipleSelectConfig represents the multiple // options for a config variable. MultipleSelectConfig *MultipleSelectConfig `json:"multipleSelectConfig,omitempty"` - // Required: Flag represents that this `ConfigVariable` must be provided for a - // connection. + // Required: Optional. Flag represents that this `ConfigVariable` must be + // provided for a connection. Required bool `json:"required,omitempty"` - // RequiredCondition: Condition under which a field would be required. The - // condition can be represented in the form of a logical expression. + // RequiredCondition: Optional. Condition under which a field would be + // required. The condition can be represented in the form of a logical + // expression. RequiredCondition *LogicalExpression `json:"requiredCondition,omitempty"` - // RoleGrant: Role grant configuration for the config variable. + // RoleGrant: Optional. Role grant configuration for the config variable. RoleGrant *RoleGrant `json:"roleGrant,omitempty"` - // State: State of the config variable. + // State: Output only. State of the config variable. // // Possible values: // "STATE_UNSPECIFIED" - Status is unspecified. // "ACTIVE" - Config variable is active // "DEPRECATED" - Config variable is deprecated. State string `json:"state,omitempty"` - // ValidationRegex: Regular expression in RE2 syntax used for validating the - // `value` of a `ConfigVariable`. + // ValidationRegex: Optional. Regular expression in RE2 syntax used for + // validating the `value` of a `ConfigVariable`. ValidationRegex string `json:"validationRegex,omitempty"` - // ValueType: Type of the parameter: string, int, bool etc. consider custom - // type for the benefit for the validation. + // ValueType: Optional. Type of the parameter: string, int, bool etc. consider + // custom type for the benefit for the validation. // // Possible values: // "VALUE_TYPE_UNSPECIFIED" - Value type is not specified. @@ -1005,6 +1008,7 @@ type Connection struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. ConnectorVersionLaunchStage string `json:"connectorVersionLaunchStage,omitempty"` // CreateTime: Output only. Created time. @@ -1230,8 +1234,12 @@ type Connector struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` + // MarketplaceConnectorDetails: Output only. Marketplace connector details. + // Will be null if the connector is not marketplace connector. + MarketplaceConnectorDetails *MarketplaceConnectorDetails `json:"marketplaceConnectorDetails,omitempty"` // Name: Output only. Resource name of the Connector. Format: // projects/{project}/locations/{location}/providers/{provider}/connectors/{conn // ector} Only global location is supported for Connector resource. @@ -1369,6 +1377,7 @@ type ConnectorVersion struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Version. Format: @@ -1435,7 +1444,7 @@ type ConnectorVersionInfraConfig struct { // ConnectionRatelimitWindowSeconds: Output only. The window used for // ratelimiting runtime requests to connections. ConnectionRatelimitWindowSeconds int64 `json:"connectionRatelimitWindowSeconds,omitempty,string"` - // DeploymentModel: Optional. Indicates whether connector is deployed on + // DeploymentModel: Output only. Indicates whether connector is deployed on // GKE/CloudRun // // Possible values: @@ -2075,9 +2084,9 @@ func (s EndpointAttachment) MarshalJSON() ([]byte, error) { // EnumOption: EnumOption definition type EnumOption struct { - // DisplayName: Display name of the option. + // DisplayName: Optional. Display name of the option. DisplayName string `json:"displayName,omitempty"` - // Id: Id of the option. + // Id: Optional. Id of the option. Id string `json:"id,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -2151,6 +2160,8 @@ func (s EventSubscription) MarshalJSON() ([]byte, error) { type EventSubscriptionDestination struct { // Endpoint: OPTION 1: Hit an endpoint when we receive an event. Endpoint *EndPoint `json:"endpoint,omitempty"` + // Gsutil: OPTION 2: Write the event to Cloud Storage bucket. + Gsutil *GSUtil `json:"gsutil,omitempty"` // ServiceAccount: Service account needed for runtime plane to trigger IP // workflow. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -2159,6 +2170,8 @@ type EventSubscriptionDestination struct { // Possible values: // "TYPE_UNSPECIFIED" - Default state. // "ENDPOINT" - Endpoint - Hit the value of endpoint when event is received + // "GCS" - Cloud Storage - Write the event to Cloud Storage bucket + // "PUBSUB" - Pub/Sub - Write the event to Pub/Sub topic Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with empty or @@ -2258,14 +2271,14 @@ func (s EventType) MarshalJSON() ([]byte, error) { // EventingConfig: Eventing Configuration of a connection type EventingConfig struct { - // AdditionalVariables: Additional eventing related field values + // AdditionalVariables: Optional. Additional eventing related field values AdditionalVariables []*ConfigVariable `json:"additionalVariables,omitempty"` - // AuthConfig: Auth details for the webhook adapter. + // AuthConfig: Optional. Auth details for the webhook adapter. AuthConfig *AuthConfig `json:"authConfig,omitempty"` // DeadLetterConfig: Optional. Dead letter configuration for eventing of a // connection. DeadLetterConfig *DeadLetterConfig `json:"deadLetterConfig,omitempty"` - // EnrichmentEnabled: Enrichment Enabled. + // EnrichmentEnabled: Optional. Enrichment Enabled. EnrichmentEnabled bool `json:"enrichmentEnabled,omitempty"` // EventsListenerIngressEndpoint: Optional. Ingress endpoint of the event // listener. This is used only when private connectivity is enabled. @@ -2276,7 +2289,8 @@ type EventingConfig struct { PrivateConnectivityEnabled bool `json:"privateConnectivityEnabled,omitempty"` // ProxyDestinationConfig: Optional. Proxy for Eventing auto-registration. ProxyDestinationConfig *DestinationConfig `json:"proxyDestinationConfig,omitempty"` - // RegistrationDestinationConfig: Registration endpoint for auto registration. + // RegistrationDestinationConfig: Optional. Registration endpoint for auto + // registration. RegistrationDestinationConfig *DestinationConfig `json:"registrationDestinationConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalVariables") to // unconditionally include in API requests. By default, fields with empty or @@ -2367,6 +2381,7 @@ type EventingDetails struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Name of the Eventing trigger. @@ -2681,7 +2696,7 @@ func (s Field) MarshalJSON() ([]byte, error) { type FieldComparison struct { // BoolValue: Boolean value BoolValue bool `json:"boolValue,omitempty"` - // Comparator: Comparator to use for comparing the field value. + // Comparator: Optional. Comparator to use for comparing the field value. // // Possible values: // "COMPARATOR_UNSPECIFIED" - The default value. @@ -2690,7 +2705,7 @@ type FieldComparison struct { Comparator string `json:"comparator,omitempty"` // IntValue: Integer value IntValue int64 `json:"intValue,omitempty,string"` - // Key: Key of the field. + // Key: Optional. Key of the field. Key string `json:"key,omitempty"` // StringValue: String value StringValue string `json:"stringValue,omitempty"` @@ -2712,6 +2727,29 @@ func (s FieldComparison) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GSUtil: GSUtil message includes details of the Destination Cloud Storage +// bucket. +type GSUtil struct { + // GsutilUri: Required. The URI of the Cloud Storage bucket. + GsutilUri string `json:"gsutilUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "GsutilUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GsutilUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GSUtil) MarshalJSON() ([]byte, error) { + type NoMethod GSUtil + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // HPAConfig: Autoscaling config for connector deployment system metrics. type HPAConfig struct { // CpuUtilizationThreshold: Output only. Percent CPU utilization where HPA @@ -3688,12 +3726,12 @@ func (s LockConfig) MarshalJSON() ([]byte, error) { // LogicalExpression: Struct for representing boolean expressions. type LogicalExpression struct { - // FieldComparisons: A list of fields to be compared. + // FieldComparisons: Optional. A list of fields to be compared. FieldComparisons []*FieldComparison `json:"fieldComparisons,omitempty"` - // LogicalExpressions: A list of nested conditions to be compared. + // LogicalExpressions: Optional. A list of nested conditions to be compared. LogicalExpressions []*LogicalExpression `json:"logicalExpressions,omitempty"` - // LogicalOperator: The logical operator to use between the fields and - // conditions. + // LogicalOperator: Optional. The logical operator to use between the fields + // and conditions. // // Possible values: // "OPERATOR_UNSPECIFIED" - The default value. @@ -3907,6 +3945,34 @@ func (s ManagedZone) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MarketplaceConnectorDetails: Marketplace connector details. +type MarketplaceConnectorDetails struct { + // MarketplaceProduct: Marketplace product name. + MarketplaceProduct string `json:"marketplaceProduct,omitempty"` + // MarketplaceProductId: Marketplace product ID. + MarketplaceProductId string `json:"marketplaceProductId,omitempty"` + // MarketplaceProductUri: Marketplace product URL. + MarketplaceProductUri string `json:"marketplaceProductUri,omitempty"` + // Partner: The name of the partner. + Partner string `json:"partner,omitempty"` + // ForceSendFields is a list of field names (e.g. "MarketplaceProduct") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MarketplaceProduct") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MarketplaceConnectorDetails) MarshalJSON() ([]byte, error) { + type NoMethod MarketplaceConnectorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MultipleSelectConfig: MultipleSelectConfig represents the multiple options // for a config variable. type MultipleSelectConfig struct { @@ -4494,6 +4560,7 @@ type Provider struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Provider. Format: @@ -4556,6 +4623,30 @@ func (s ProvisionedResource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PublishCustomConnectorVersionRequest: Request message for +// ConnectorsService.PublishCustomConnectorVersion +type PublishCustomConnectorVersionRequest struct { + // PartnerMetadata: Required. Partner metadata details for validating and + // publishing the custom connector as a partner connector version. + PartnerMetadata *PartnerMetadata `json:"partnerMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "PartnerMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PartnerMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PublishCustomConnectorVersionRequest) MarshalJSON() ([]byte, error) { + type NoMethod PublishCustomConnectorVersionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // PublishStatus: Publish status of a custom connector. type PublishStatus struct { // PublishState: Output only. Publish state of the custom connector. @@ -4638,11 +4729,11 @@ type RepairEventingRequest struct { // Resource: Resource definition type Resource struct { - // PathTemplate: Template to uniquely represent a Google Cloud resource in a - // format IAM expects This is a template that can have references to other - // values provided in the config variable template. + // PathTemplate: Optional. Template to uniquely represent a Google Cloud + // resource in a format IAM expects This is a template that can have references + // to other values provided in the config variable template. PathTemplate string `json:"pathTemplate,omitempty"` - // Type: Different types of resource supported. + // Type: Optional. Different types of resource supported. // // Possible values: // "TYPE_UNSPECIFIED" - Value type is not specified. @@ -4814,10 +4905,10 @@ type RetryEventSubscriptionRequest struct { // used by the UI to render a 'grant' button to do the same on behalf of the // user. type RoleGrant struct { - // HelperTextTemplate: Template that UI can use to provide helper text to - // customers. + // HelperTextTemplate: Optional. Template that UI can use to provide helper + // text to customers. HelperTextTemplate string `json:"helperTextTemplate,omitempty"` - // Principal: Prinicipal/Identity for whom the role need to assigned. + // Principal: Optional. Prinicipal/Identity for whom the role need to assigned. // // Possible values: // "PRINCIPAL_UNSPECIFIED" - Value type is not specified. @@ -4825,9 +4916,10 @@ type RoleGrant struct { // is either the default service account if unspecified or Service Account // provided by Customers through BYOSA. Principal string `json:"principal,omitempty"` - // Resource: Resource on which the roles needs to be granted for the principal. + // Resource: Optional. Resource on which the roles needs to be granted for the + // principal. Resource *Resource `json:"resource,omitempty"` - // Roles: List of roles that need to be granted. + // Roles: Optional. List of roles that need to be granted. Roles []string `json:"roles,omitempty"` // ForceSendFields is a list of field names (e.g. "HelperTextTemplate") to // unconditionally include in API requests. By default, fields with empty or @@ -5311,45 +5403,45 @@ func (s SshPublicKey) MarshalJSON() ([]byte, error) { // SslConfig: SSL Configuration of a connection type SslConfig struct { - // AdditionalVariables: Additional SSL related field values + // AdditionalVariables: Optional. Additional SSL related field values AdditionalVariables []*ConfigVariable `json:"additionalVariables,omitempty"` - // ClientCertType: Type of Client Cert (PEM/JKS/.. etc.) + // ClientCertType: Optional. Type of Client Cert (PEM/JKS/.. etc.) // // Possible values: // "CERT_TYPE_UNSPECIFIED" - Cert type unspecified. // "PEM" - Privacy Enhanced Mail (PEM) Type ClientCertType string `json:"clientCertType,omitempty"` - // ClientCertificate: Client Certificate + // ClientCertificate: Optional. Client Certificate ClientCertificate *Secret `json:"clientCertificate,omitempty"` - // ClientPrivateKey: Client Private Key + // ClientPrivateKey: Optional. Client Private Key ClientPrivateKey *Secret `json:"clientPrivateKey,omitempty"` - // ClientPrivateKeyPass: Secret containing the passphrase protecting the Client - // Private Key + // ClientPrivateKeyPass: Optional. Secret containing the passphrase protecting + // the Client Private Key ClientPrivateKeyPass *Secret `json:"clientPrivateKeyPass,omitempty"` - // PrivateServerCertificate: Private Server Certificate. Needs to be specified - // if trust model is `PRIVATE`. + // PrivateServerCertificate: Optional. Private Server Certificate. Needs to be + // specified if trust model is `PRIVATE`. PrivateServerCertificate *Secret `json:"privateServerCertificate,omitempty"` - // ServerCertType: Type of Server Cert (PEM/JKS/.. etc.) + // ServerCertType: Optional. Type of Server Cert (PEM/JKS/.. etc.) // // Possible values: // "CERT_TYPE_UNSPECIFIED" - Cert type unspecified. // "PEM" - Privacy Enhanced Mail (PEM) Type ServerCertType string `json:"serverCertType,omitempty"` - // TrustModel: Trust Model of the SSL connection + // TrustModel: Optional. Trust Model of the SSL connection // // Possible values: // "PUBLIC" - Public Trust Model. Takes the Default Java trust store. // "PRIVATE" - Private Trust Model. Takes custom/private trust store. // "INSECURE" - Insecure Trust Model. Accept all certificates. TrustModel string `json:"trustModel,omitempty"` - // Type: Controls the ssl type for the given connector version. + // Type: Optional. Controls the ssl type for the given connector version. // // Possible values: // "SSL_TYPE_UNSPECIFIED" - No SSL configuration required. // "TLS" - TLS Handshake // "MTLS" - mutual TLS (MTLS) Handshake Type string `json:"type,omitempty"` - // UseSsl: Bool for enabling SSL + // UseSsl: Optional. Bool for enabling SSL UseSsl bool `json:"useSsl,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalVariables") to // unconditionally include in API requests. By default, fields with empty or @@ -5819,6 +5911,11 @@ func (s WeeklyCycle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// WithdrawCustomConnectorVersionRequest: Request message for +// ConnectorsService.WithdrawCustomConnectorVersion +type WithdrawCustomConnectorVersionRequest struct { +} + type ProjectsLocationsGetCall struct { s *Service name string @@ -9772,6 +9869,214 @@ func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) return ret, nil } +type ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall struct { + s *Service + name string + publishcustomconnectorversionrequest *PublishCustomConnectorVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Publish: Publish request for the CustomConnectorVersion. Once approved, the +// CustomConnectorVersion will be published as PartnerConnector. +// +// - name: Resource name of the form: +// `projects/{project}/locations/{location}/customConnectors/{custom_connector +// }/customConnectorVersions/{custom_connector_version}`. +func (r *ProjectsLocationsCustomConnectorsCustomConnectorVersionsService) Publish(name string, publishcustomconnectorversionrequest *PublishCustomConnectorVersionRequest) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c := &ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.publishcustomconnectorversionrequest = publishcustomconnectorversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Context(ctx context.Context) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishcustomconnectorversionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:publish") + 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 "connectors.projects.locations.customConnectors.customConnectorVersions.publish" 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 *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) 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 ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall struct { + s *Service + name string + withdrawcustomconnectorversionrequest *WithdrawCustomConnectorVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Withdraw: Withdraw the publish request for the CustomConnectorVersion. This +// can only be used before the CustomConnectorVersion is published. +// +// - name: Resource name of the form: +// `projects/{project}/locations/{location}/customConnectors/{custom_connector +// }/customConnectorVersions/{custom_connector_version}`. +func (r *ProjectsLocationsCustomConnectorsCustomConnectorVersionsService) Withdraw(name string, withdrawcustomconnectorversionrequest *WithdrawCustomConnectorVersionRequest) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c := &ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.withdrawcustomconnectorversionrequest = withdrawcustomconnectorversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Context(ctx context.Context) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.withdrawcustomconnectorversionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:withdraw") + 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 "connectors.projects.locations.customConnectors.customConnectorVersions.withdraw" 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 *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) 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 ProjectsLocationsEndpointAttachmentsCreateCall struct { s *Service parent string @@ -12152,7 +12457,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index dd79fb29abf..86b662e15b6 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -1719,6 +1719,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -1802,6 +1836,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1869,6 +1931,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -2546,7 +2613,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -3278,6 +3345,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", @@ -3361,6 +3462,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -3428,6 +3557,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -4984,6 +5118,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -5067,6 +5235,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -5134,6 +5330,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -5605,7 +5806,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/dataStores/[^/]+$", "required": true, @@ -5949,7 +6150,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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, @@ -6140,7 +6341,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -6610,6 +6811,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -6693,6 +6906,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1AnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1AnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequest", @@ -6889,6 +7135,31 @@ "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" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -6905,7 +7176,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -9511,6 +9782,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -11200,6 +11475,10 @@ "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": "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -11717,16 +11996,194 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfig", + "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.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "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" + }, + "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": "array" + }, + "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" + }, + "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" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "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.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "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" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. ServingConfig updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "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" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" + }, + "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" + }, "GoogleCloudDiscoveryengineV1Session": { "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1Session", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -12431,6 +12888,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -12514,6 +12983,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { "description": "Query understanding information.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", @@ -13584,6 +14086,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -14371,6 +14884,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -14744,6 +15272,52 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", + "properties": { + "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" + }, "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { "description": "Configuration for Natural Language Query Understanding.", "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", @@ -15749,6 +16323,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -16014,12 +16592,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -16353,6 +16939,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "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.", + "format": "google-fieldmask", + "type": "string" + } + }, + "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", @@ -18647,6 +19249,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 23d49afca66..b962aa081fd 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1634,6 +1634,11 @@ type GoogleCloudDiscoveryengineV1Answer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1AnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -1675,6 +1680,20 @@ func (s GoogleCloudDiscoveryengineV1Answer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1Answer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1Answer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1AnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1AnswerCitation struct { // EndIndex: End of the attributed segment, exclusive. @@ -1724,6 +1743,57 @@ func (s GoogleCloudDiscoveryengineV1AnswerCitationSource) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AnswerGroundingSupport: Grounding support for a +// claim in `answer_text`. +type GoogleCloudDiscoveryengineV1AnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1AnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, 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. "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 GoogleCloudDiscoveryengineV1AnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1AnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1AnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1AnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1AnswerQueryRequest struct { @@ -2002,6 +2072,8 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRe // 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"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,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 @@ -2020,6 +2092,35 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQuer return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryReph +// raserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec: Related // questions specification. type GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec struct { @@ -2044,7 +2145,10 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec) Mars } // GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -5611,6 +5715,13 @@ type GoogleCloudDiscoveryengineV1FhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,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 @@ -8246,6 +8357,10 @@ func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecMod // data stores to filter on in a search call and configurations for those data // stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec struct { + // BoostSpec: Optional. 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 *GoogleCloudDiscoveryengineV1SearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -8255,13 +8370,13 @@ type GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -9026,10 +9141,233 @@ func (s GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ServingConfig: 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 GoogleCloudDiscoveryengineV1ServingConfig 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"` + // 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 *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `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 *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `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"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,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 GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `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 GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: 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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + 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 +} + // GoogleCloudDiscoveryengineV1Session: External session proto definition. type GoogleCloudDiscoveryengineV1Session struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -9049,13 +9387,13 @@ type GoogleCloudDiscoveryengineV1Session struct { // 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 + // 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. "EndTime") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9994,6 +10332,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -10032,6 +10375,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -10082,6 +10439,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, 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. "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 GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query // understanding information. type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { @@ -11494,6 +11902,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -12562,6 +12995,34 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -13070,6 +13531,70 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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 GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsResponse 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 []*GoogleCloudDiscoveryengineV1alphaSession `json:"sessions,omitempty"` + // 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 GoogleCloudDiscoveryengineV1alphaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: // Configuration for Natural Language Query Understanding. type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { @@ -14539,6 +15064,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -14548,13 +15077,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -14987,8 +15516,15 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -15005,13 +15541,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { 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 + // 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. "EndTime") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -15415,6 +15951,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // 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. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + 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. @@ -18609,6 +19172,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -18618,13 +19185,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -25599,6 +26166,119 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + 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 { + 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 { + c.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 { + 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.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1ServingConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: 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 ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { s *Service servingConfig string @@ -25974,6 +26654,115 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pag } } +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") + 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.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ServerResponse: 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 ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { s *Service parent string @@ -26198,6 +26987,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -28668,9 +29464,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -31372,6 +32171,119 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + 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 *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + 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 { + 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 { + c.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 { + 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.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1ServingConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: 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 ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { s *Service servingConfig string @@ -31593,7 +32505,143 @@ 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(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.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.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:searchLite") + 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.searchLite" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ServerResponse: 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) for { @@ -31611,71 +32659,65 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx } } -type ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31688,13 +32730,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31713,7 +32755,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31726,27 +32768,6 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.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.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken - } -} - type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -31971,6 +32992,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -37648,6 +38676,119 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + 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, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + 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 { + 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 { + c.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 { + 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_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1ServingConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: 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 ProjectsLocationsDataStoresServingConfigsRecommendCall struct { s *Service servingConfig string @@ -38023,6 +39164,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") + 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.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ServerResponse: 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 ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -38247,6 +39497,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -39938,9 +41195,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -41133,9 +42393,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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 *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index ac881c8379c..f2b363cd040 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -2391,6 +2391,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -2458,6 +2486,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -3245,7 +3278,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -4271,6 +4304,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -4338,6 +4399,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6285,6 +6351,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -6352,6 +6446,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6911,7 +7010,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/dataStores/[^/]+$", "required": true, @@ -7820,7 +7919,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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, @@ -8057,7 +8156,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -9825,6 +9924,353 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "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": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "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 DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": { + "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": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "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" + }, + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "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" + }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", + "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" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfig", + "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.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "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" + }, + "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": "array" + }, + "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" + }, + "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" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "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.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "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" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. ServingConfig updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "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" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" + }, + "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" + }, "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", @@ -10449,6 +10895,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -10532,6 +10990,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest", @@ -10728,6 +11219,31 @@ "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" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -10744,7 +11260,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -12949,6 +13465,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -13923,6 +14450,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -14125,6 +14656,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -15011,6 +15557,34 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { "description": "Response for ListSessions method.", "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", @@ -16768,6 +17342,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -17852,12 +18430,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -18386,6 +18972,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "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.", + "format": "google-fieldmask", + "type": "string" + } + }, + "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", @@ -20791,6 +21393,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 21ce63980cc..91fe69cbaf3 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -3589,6 +3589,522 @@ func (s GoogleCloudDiscoveryengineV1SearchLinkPromotion) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification +// for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec 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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // 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 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 + // 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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec `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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec: +// 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSp +// ec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. The default value is `false`. If this field is set to + // `false`, all search results are used regardless of relevance to generate + // answers. If set to `true`, only queries with high relevance search results + // will generate answers. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec `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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPro +// mptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec 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. "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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpe +// c: Specification of the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec 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:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfig: 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 GoogleCloudDiscoveryengineV1ServingConfig 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"` + // 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 *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `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 *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `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"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,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"` + // 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 GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `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 GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: 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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + 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 +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -4379,6 +4895,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -4420,6 +4941,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -4470,6 +5005,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, 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. "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 GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest struct { @@ -4747,6 +5333,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQu // 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"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,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 @@ -4765,6 +5353,35 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpe return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQuer +// yRephraserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec: // Related questions specification. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec struct { @@ -4789,7 +5406,10 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec) } // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -7832,6 +8452,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -9245,6 +9890,13 @@ type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,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 @@ -9514,6 +10166,34 @@ func (s GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -10812,6 +11492,45 @@ func (s GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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 GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for // ListSessions method. type GoogleCloudDiscoveryengineV1alphaListSessionsResponse struct { @@ -13476,6 +14195,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -13485,13 +14208,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -15025,8 +15748,15 @@ func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) UnmarshalJSO // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -15046,13 +15776,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { // 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 + // 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. "EndTime") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -15760,6 +16490,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // 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. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + 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. @@ -19122,6 +19879,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -19131,13 +19892,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -28602,7 +29363,143 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { +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 ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*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/{+servingConfig}:searchLite") + 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.searchLite" 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 +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ServerResponse: 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) for { @@ -28620,71 +29517,65 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c } } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*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.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}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28697,13 +29588,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer" 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 +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28722,7 +29613,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28735,27 +29626,6 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) 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 @@ -28980,6 +29850,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -31868,9 +32745,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -35740,6 +36620,115 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages( } } +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*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/{+servingConfig}:streamAnswer") + 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.streamAnswer" 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 *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) 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 ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -35964,6 +36953,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -43138,6 +44134,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{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 *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*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/{+servingConfig}:streamAnswer") + 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.streamAnswer" 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 *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) 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 ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -43362,6 +44467,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -45375,9 +46487,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -48718,9 +49833,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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 *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index a437a6601c2..8258b95e126 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1929,6 +1929,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1996,6 +2024,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -2730,7 +2763,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -3756,6 +3789,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -3823,6 +3884,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -5589,6 +5655,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -5656,6 +5750,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6215,7 +6314,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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/[^/]+/dataStores/[^/]+$", "required": true, @@ -7092,7 +7191,7 @@ "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. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect 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, @@ -7255,7 +7354,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -8927,97 +9026,444 @@ "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.", + "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", + "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" + }, + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", + "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" + }, + "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" + }, + "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" + }, + "GoogleCloudDiscoveryengineV1SearchLinkPromotion": { + "description": "Promotion proto includes uri and other helping information to display the promotion.", + "id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion", + "properties": { + "description": { + "description": "Optional. The Promotion description. Maximum length: 200 characters.", + "type": "string" + }, + "enabled": { + "description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.", + "type": "boolean" + }, + "imageUri": { + "description": "Optional. The promotion thumbnail image url.", + "type": "string" + }, + "title": { + "description": "Required. The title of the promotion. Maximum length: 160 characters.", + "type": "string" + }, + "uri": { + "description": "Required. The URL for the page the user wants to promote.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "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": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "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 DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": { + "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": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "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" + }, + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "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" + }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", + "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" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "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" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "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" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfig", + "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.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "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" + }, + "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": "array" + }, + "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" + }, + "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" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "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.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "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" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "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" + }, + "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" + }, + "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" + }, + "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" + }, + "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": { "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", - "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.", + "description": "Output only. ServingConfig updated timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", - "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" - }, - "GoogleCloudDiscoveryengineV1Schema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1Schema", + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", "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" + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1SearchLinkPromotion": { - "description": "Promotion proto includes uri and other helping information to display the promotion.", - "id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion", + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "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": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", "properties": { - "description": { - "description": "Optional. The Promotion description. Maximum length: 200 characters.", - "type": "string" + "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" }, - "enabled": { - "description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.", - "type": "boolean" + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" }, - "imageUri": { - "description": "Optional. The promotion thumbnail image url.", - "type": "string" + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" }, - "title": { - "description": "Required. The title of the promotion. Maximum length: 160 characters.", - "type": "string" + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" }, - "uri": { - "description": "Required. The URL for the page the user wants to promote.", + "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" } }, @@ -9386,6 +9832,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -9469,6 +9927,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { "description": "Query understanding information.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", @@ -10539,6 +11030,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -11326,6 +11828,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -11699,6 +12216,52 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "type": "string" + }, + "orderBy": { + "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", + "properties": { + "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" + }, "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { "description": "Configuration for Natural Language Query Understanding.", "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", @@ -12704,6 +13267,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -12969,12 +13536,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -13308,6 +13883,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "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.", + "format": "google-fieldmask", + "type": "string" + } + }, + "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", @@ -13708,6 +14299,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -13791,6 +14394,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest", @@ -13987,6 +14623,31 @@ "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" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -14003,7 +14664,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -16809,6 +17470,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -18939,6 +19604,10 @@ "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": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. 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)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -20015,12 +20684,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1betaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 7deb7a4adce..9f263cac975 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -3517,6 +3517,522 @@ func (s GoogleCloudDiscoveryengineV1SearchLinkPromotion) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification +// for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec 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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // 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 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 + // 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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec `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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec: +// 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSp +// ec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. The default value is `false`. If this field is set to + // `false`, all search results are used regardless of relevance to generate + // answers. If set to `true`, only queries with high relevance search results + // will generate answers. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,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 *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec `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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPro +// mptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec 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. "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 GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpe +// c: Specification of the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec 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:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfig: 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 GoogleCloudDiscoveryengineV1ServingConfig 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"` + // 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 *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `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 *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `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"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,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"` + // 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 GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `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 GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: 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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig 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"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,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 GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + 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 +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -3947,6 +4463,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -3985,6 +4506,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -4035,6 +4570,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, 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. "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 GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query // understanding information. type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { @@ -5447,6 +6033,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -6515,6 +7126,34 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -7023,6 +7662,70 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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 GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsResponse 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 []*GoogleCloudDiscoveryengineV1alphaSession `json:"sessions,omitempty"` + // 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 GoogleCloudDiscoveryengineV1alphaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: // Configuration for Natural Language Query Understanding. type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { @@ -8492,6 +9195,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -8501,13 +9208,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -8940,8 +9647,15 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -8958,13 +9672,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { 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 + // 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. "EndTime") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9368,6 +10082,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // 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. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + 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. @@ -9874,6 +10615,11 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -9915,6 +10661,20 @@ func (s GoogleCloudDiscoveryengineV1betaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1betaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { // EndIndex: End of the attributed segment, exclusive. @@ -9964,6 +10724,57 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, 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. "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 GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1betaAnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { @@ -10241,6 +11052,8 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQue // 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"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,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 @@ -10259,6 +11072,35 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery +// RephraserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec: // Related questions specification. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec struct { @@ -10283,7 +11125,10 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec) } // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -14145,6 +14990,13 @@ type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,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 @@ -17426,6 +18278,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // 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 { + // BoostSpec: Optional. 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"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -17435,13 +18291,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. "DataStore") 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. @@ -18969,8 +19825,15 @@ func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON // GoogleCloudDiscoveryengineV1betaSession: External session proto definition. type GoogleCloudDiscoveryengineV1betaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -18990,13 +19853,13 @@ type GoogleCloudDiscoveryengineV1betaSession struct { // 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 + // 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. "EndTime") to include in API + // NullFields is a list of field names (e.g. "DisplayName") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -26721,7 +27584,143 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { +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 ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*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}:searchLite") + 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.searchLite" 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) for { @@ -26739,71 +27738,65 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c } } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - 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) SearchLite(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest + 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*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.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}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26816,13 +27809,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer" 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 +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26841,7 +27834,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26854,27 +27847,6 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) 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 @@ -27099,6 +28071,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -29773,9 +30752,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -33645,6 +34627,115 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages( } } +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{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 *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*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/{+servingConfig}:streamAnswer") + 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.streamAnswer" 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 +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ServerResponse: 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 ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -33869,6 +34960,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -40401,6 +41499,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - 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) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{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 *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*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/{+servingConfig}:streamAnswer") + 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.streamAnswer" 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 +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ServerResponse: 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 ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -40625,6 +41832,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -42636,9 +43850,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -45878,9 +47095,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect 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 *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 1a0b489547a..1ace7acfb2a 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -6322,7 +6322,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `5000`. If unspecified, this value defaults to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -9267,7 +9267,7 @@ } } }, - "revision": "20241114", + "revision": "20241205", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -14114,6 +14114,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14200,6 +14201,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14311,6 +14313,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14397,6 +14400,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14509,6 +14513,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14595,6 +14600,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14708,6 +14714,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14794,6 +14801,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "readOnly": true, @@ -15758,6 +15766,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15844,6 +15853,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -16673,6 +16683,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -16759,6 +16770,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 9ec44d3bd89..cc5d34eb0bc 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -6834,6 +6834,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -6968,6 +6969,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The @@ -7086,6 +7088,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -7207,6 +7210,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -8241,6 +8245,7 @@ type GuaranteedOrder struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed @@ -9027,6 +9032,7 @@ type InventorySource struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this @@ -29523,8 +29529,8 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. +// be between `1` and `5000`. If unspecified, this value defaults to `100`. +// Returns error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index a0282f27785..98a596b82db 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -6271,7 +6271,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `5000`. If unspecified, this value defaults to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -9222,7 +9222,7 @@ } } }, - "revision": "20241114", + "revision": "20241205", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -10321,6 +10321,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -10407,6 +10408,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -10566,10 +10568,10 @@ "enumDescriptions": [ "Unknown operator.", "Values are equal.", - "First value is greater than the comparison value.", - "First value is less than the second.", - "First value is greater than or equal to the second.", - "First value is less or equals to the comparison value." + "Signal value is greater than the comparison value.", + "Signal value is less than the second.", + "Signal value is greater than or equal to the second.", + "Signal value is less or equals to the comparison value." ], "type": "string" }, @@ -15103,6 +15105,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15189,6 +15192,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15300,6 +15304,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15386,6 +15391,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15498,6 +15504,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15584,6 +15591,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15697,6 +15705,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15783,6 +15792,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "readOnly": true, @@ -16747,6 +16757,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -16833,6 +16844,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -17676,6 +17688,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -17762,6 +17775,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index db1141f3463..a0f344163d1 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1871,6 +1871,7 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. ExchangeValue string `json:"exchangeValue,omitempty"` // Int64Value: Integer value. @@ -2083,11 +2084,11 @@ type AlgorithmRulesSignalComparison struct { // Possible values: // "COMPARISON_OPERATOR_UNSPECIFIED" - Unknown operator. // "EQUAL" - Values are equal. - // "GREATER_THAN" - First value is greater than the comparison value. - // "LESS_THAN" - First value is less than the second. - // "GREATER_THAN_OR_EQUAL_TO" - First value is greater than or equal to the + // "GREATER_THAN" - Signal value is greater than the comparison value. + // "LESS_THAN" - Signal value is less than the second. + // "GREATER_THAN_OR_EQUAL_TO" - Signal value is greater than or equal to the // second. - // "LESS_THAN_OR_EQUAL_TO" - First value is less or equals to the comparison + // "LESS_THAN_OR_EQUAL_TO" - Signal value is less or equals to the comparison // value. ComparisonOperator string `json:"comparisonOperator,omitempty"` // ComparisonValue: Value to compare signal to. @@ -7800,6 +7801,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -7934,6 +7936,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The @@ -8052,6 +8055,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -8173,6 +8177,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9207,6 +9212,7 @@ type GuaranteedOrder struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed @@ -10009,6 +10015,7 @@ type InventorySource struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this @@ -30152,8 +30159,8 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. +// be between `1` and `5000`. If unspecified, this value defaults to `100`. +// Returns error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 8d2e39b07ef..ba6580c68b7 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -5015,7 +5015,7 @@ } } }, - "revision": "20241110", + "revision": "20241204", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -9042,6 +9042,10 @@ "description": "Human readable form of the infoType name.", "type": "string" }, + "example": { + "description": "A sample true positive for this infoType.", + "type": "string" + }, "name": { "description": "Internal name of the infoType.", "type": "string" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 5fc4c7ad188..57fcf20a3a9 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -6079,6 +6079,8 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { Description string `json:"description,omitempty"` // DisplayName: Human readable form of the infoType name. DisplayName string `json:"displayName,omitempty"` + // Example: A sample true positive for this infoType. + Example string `json:"example,omitempty"` // Name: Internal name of the infoType. Name string `json:"name,omitempty"` // SensitivityScore: The default sensitivity of the infoType. diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 2b603067360..eea596f53ad 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20241203", + "revision": "20241204", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -812,6 +812,22 @@ "format": "int32", "type": "integer" }, + "mediaResolution": { + "description": "Optional. If specified, the media resolution specified will be used.", + "enum": [ + "MEDIA_RESOLUTION_UNSPECIFIED", + "MEDIA_RESOLUTION_LOW", + "MEDIA_RESOLUTION_MEDIUM", + "MEDIA_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Media resolution has not been set.", + "Media resolution set to low (64 tokens).", + "Media resolution set to medium (256 tokens).", + "Media resolution set to high (zoomed reframing with 256 tokens)." + ], + "type": "string" + }, "presencePenalty": { "description": "Optional. Positive penalties.", "format": "float", @@ -873,22 +889,6 @@ "format": "float", "type": "number" }, - "tokenResolution": { - "description": "Optional. If specified, the token resolution specified will be used.", - "enum": [ - "TOKEN_RESOLUTION_UNSPECIFIED", - "TOKEN_RESOLUTION_LOW", - "TOKEN_RESOLUTION_MEDIUM", - "TOKEN_RESOLUTION_HIGH" - ], - "enumDescriptions": [ - "Token resolution has not been set.", - "Token resolution set to low (64 tokens).", - "Token resolution set to medium (256 tokens).", - "Token resolution set to high (P\u0026S with 256 tokens)." - ], - "type": "string" - }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index d06c755cb94..4f87f27bc58 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -949,6 +949,16 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // MaxOutputTokens: Optional. The maximum number of output tokens to generate // per message. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty"` + // MediaResolution: Optional. If specified, the media resolution specified will + // be used. + // + // Possible values: + // "MEDIA_RESOLUTION_UNSPECIFIED" - Media resolution has not been set. + // "MEDIA_RESOLUTION_LOW" - Media resolution set to low (64 tokens). + // "MEDIA_RESOLUTION_MEDIUM" - Media resolution set to medium (256 tokens). + // "MEDIA_RESOLUTION_HIGH" - Media resolution set to high (zoomed reframing + // with 256 tokens). + MediaResolution string `json:"mediaResolution,omitempty"` // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` // ResponseLogprobs: Optional. If true, export the logprobs results in @@ -985,16 +995,6 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` - // TokenResolution: Optional. If specified, the token resolution specified will - // be used. - // - // Possible values: - // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. - // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). - // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). - // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 - // tokens). - TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 641eece5597..b1c5ca8962e 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1796,7 +1796,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3232,7 +3232,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3397,7 +3397,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 211fea3bdd1..5b72491f8ad 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -2163,8 +2163,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. RequestedCancellation bool `json:"requestedCancellation,omitempty"` // StatusMessage: Output only. Human-readable status of the operation, if any. StatusMessage string `json:"statusMessage,omitempty"` @@ -2430,7 +2430,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v2/metastore-api.json b/metastore/v2/metastore-api.json new file mode 100644 index 00000000000..dd95c53399a --- /dev/null +++ b/metastore/v2/metastore-api.json @@ -0,0 +1,1813 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "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": "metastore:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2AlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2ExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2ImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2MoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2QueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2RestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2AlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2AuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2Endpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2Backup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2Backup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2Service", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2DataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2DataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2DatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2DatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2EncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2EncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2Endpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2Endpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2ExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2HiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2HiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2AuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2ImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2DatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2LatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2LatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2ListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "type": "array" + }, + "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" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2ListServicesResponse", + "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" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2MetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2MetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2DataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2MoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2MoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2QueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2QueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2RestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2RestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2ScalingConfig", + "properties": { + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2ScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2LatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2Service": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2Service", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2EncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2Endpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2HiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2MetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2ScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2ScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2/metastore-gen.go b/metastore/v2/metastore-gen.go new file mode 100644 index 00000000000..133f37961e6 --- /dev/null +++ b/metastore/v2/metastore-gen.go @@ -0,0 +1,3639 @@ +// 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 metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # 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/metastore/v2" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.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]: +// +// metastoreService, err := metastore.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, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2" +const apiName = "metastore" +const apiVersion = "v2" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest: Request message +// for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2AlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AuxiliaryVersionConfig: Configuration information for +// the auxiliary service versions. +type GoogleCloudMetastoreV2AuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2Backup: The details of a backup resource. +type GoogleCloudMetastoreV2Backup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2Service `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + 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 GoogleCloudMetastoreV2Backup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2DataCatalogConfig: Specifies how metastore metadata +// should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2DataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2DataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2DataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2DatabaseDump: A specification of the location of and +// metadata about a database dump from a relational database management system. +type GoogleCloudMetastoreV2DatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2DatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2DatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2EncryptionConfig: Encryption settings for the service. +type GoogleCloudMetastoreV2EncryptionConfig struct { +} + +// GoogleCloudMetastoreV2Endpoint: An endpoint used to access the metastore +// service. +type GoogleCloudMetastoreV2Endpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2Endpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Endpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2ExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2HiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2HiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2HiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2HiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2ImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2DatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2LatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2LatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2LatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2LatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2ListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2Backup `json:"backups,omitempty"` + // 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"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2ListServicesResponse 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"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2Service `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2MetadataIntegration: Specifies how metastore metadata +// should be integrated with external services. +type GoogleCloudMetastoreV2MetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2DataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2MetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2MetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2MoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2MoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2MoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2QueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2QueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + 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. "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 GoogleCloudMetastoreV2QueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2QueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2RestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2RestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2RestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2RestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ScalingConfig: Represents the scaling configuration of +// a metastore service. +type GoogleCloudMetastoreV2ScalingConfig struct { + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "ScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ScalingFactor") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ScheduledBackup: This specifies the configuration of +// scheduled backup. +type GoogleCloudMetastoreV2ScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2LatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2Service: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2Service struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2EncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2MetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2ScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2ScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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 GoogleCloudMetastoreV2Service) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Service + 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) +} + +// 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) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2altermetadataresourcelocationrequest = googlecloudmetastorev2altermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2altermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" 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 *ProjectsLocationsServicesAlterLocationCall) 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 ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2altertablepropertiesrequest = googlecloudmetastorev2altertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2altertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2service *GoogleCloudMetastoreV2Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2service = googlecloudmetastorev2service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2service) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services") + 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 "metastore.projects.locations.services.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 *ProjectsLocationsServicesCreateCall) 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 ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + 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 *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) 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, "v2/{+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 "metastore.projects.locations.services.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 *ProjectsLocationsServicesDeleteCall) 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 ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2exportmetadatarequest = googlecloudmetastorev2exportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2exportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" 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 *ProjectsLocationsServicesExportMetadataCall) 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 ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{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 *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2Service.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Service, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudMetastoreV2Service{ + ServerResponse: 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 ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2importmetadatarequest = googlecloudmetastorev2importmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2importmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" 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 *ProjectsLocationsServicesImportMetadataCall) 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 ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + 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 *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2ListServicesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListServicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudMetastoreV2ListServicesResponse{ + ServerResponse: 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 *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListServicesResponse) 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 ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2movetabletodatabaserequest = googlecloudmetastorev2movetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2movetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2service *GoogleCloudMetastoreV2Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2service = googlecloudmetastorev2service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + 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 *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2service) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("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 "metastore.projects.locations.services.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 *ProjectsLocationsServicesPatchCall) 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 ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2querymetadatarequest = googlecloudmetastorev2querymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2querymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" 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 *ProjectsLocationsServicesQueryMetadataCall) 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 ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2restoreservicerequest = googlecloudmetastorev2restoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2restoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesRestoreCall) 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 ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2backup = googlecloudmetastorev2backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + 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 *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2backup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.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 *ProjectsLocationsServicesBackupsCreateCall) 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 ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + 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 *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) 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, "v2/{+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 "metastore.projects.locations.services.backups.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 *ProjectsLocationsServicesBackupsDeleteCall) 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 ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{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 *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2Backup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Backup, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudMetastoreV2Backup{ + ServerResponse: 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 ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + 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 *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2ListBackupsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListBackupsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudMetastoreV2ListBackupsResponse{ + ServerResponse: 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 *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListBackupsResponse) 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/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 50d3d071f38..e471e1e9d54 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -1645,7 +1645,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkservices.projects.locations.operations.cancel", @@ -2661,7 +2661,7 @@ } } }, - "revision": "20241109", + "revision": "20241118", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuthzExtension": { @@ -4500,7 +4500,7 @@ "type": "object" }, "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", "id": "LoggingConfig", "properties": { "logSeverity": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 64ec76f1250..580e7f8bb8b 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -2827,7 +2827,7 @@ func (s Location) MarshalJSON() ([]byte, error) { } // LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Avdvanced resources. +// Advanced resources. type LoggingConfig struct { // LogSeverity: Optional. The minimum severity of logs that will be sent to // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be @@ -9547,7 +9547,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index ac0c2e0afa2..06206b77464 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -3895,7 +3895,7 @@ } } }, - "revision": "20240701", + "revision": "20241204", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { @@ -5144,6 +5144,10 @@ "description": "The signature of the community gallery template as computed at import time. This value is recomputed whenever the template is updated from the gallery.", "type": "string" }, + "templateDeveloperId": { + "description": "The developer id of the community gallery template. This value is set whenever the template is created from the gallery.", + "type": "string" + }, "version": { "description": "The version of the community gallery template.", "type": "string" diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index baa11c839e5..40b48de087a 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -1427,6 +1427,9 @@ type GalleryReference struct { // import time. This value is recomputed whenever the template is updated from // the gallery. Signature string `json:"signature,omitempty"` + // TemplateDeveloperId: The developer id of the community gallery template. + // This value is set whenever the template is created from the gallery. + TemplateDeveloperId string `json:"templateDeveloperId,omitempty"` // Version: The version of the community gallery template. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Host") to unconditionally